Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
|
I have a question that is mostly for those who are using 'C' code written for other platforms and ported to CCS. Using CCS v1.2 I have had a number of problems with it generating code that doesn't work as expected. Some are related to pipeline conflicts that aren't caught by the compiler (fixed by writing in assembly), ints that should have been longs (but the compiler didn't complain when something like a 0x10000 was assigned to the int), and 'complicated' code where several expressions are included on the same line (sorry, no good examples. I fixed the problems and have since forgotten the specifics). I need to get some idea of how reliable the 'C' compiler in CCS v2.0 is, and whether I can consistently generate working code with it when importing pieces from other projects. Currently I am still using CCS v1.2 for my projects. I shouldn't have to step through the assembly code generated by the 'c' compiler to confirm that it has properly done its job (note, I am not using any optimizations for fear that this will further obfuscate any problems). So has anyone had similar problems, and solved them by switching to CCS v2.0? Or is there a guide that I don't know of that makes it clear what kinds of standard 'c'-like things I shouldn't be trying with the CCS compilers? Thanks, Brian ----------------------------------------------------- Brian C. Lane (W7BCL) Programmer www.shinemicro.com RF, DSP & Microcontroller Design |
|
|
|
Hi Brian, this is not an exactly answer to your question but it may help you. Take a look at TI' Application Report spra366 - "Generating Efficient Code with TMS320". There you'll find some c-coding guidelines. Organizing your code in a propper way let the compiler produce efficient code. Regards, Christian > -----Ursprungliche Nachricht----- > Von: Brian C. Lane [mailto:] > Gesendet: Dienstag, 22. Oktober 2002 20:16 > An: > Betreff: [c54x] 'C' compatibility with CCS v2.0 > I have a question that is mostly for those who are using 'C' code > written for other platforms and ported to CCS. Using CCS v1.2 I have > had a number of problems with it generating code that doesn't work as > expected. > > Some are related to pipeline conflicts that aren't caught by the > compiler (fixed by writing in assembly), ints that should have been > longs (but the compiler didn't complain when something like a 0x10000 > was assigned to the int), and 'complicated' code where several > expressions are included on the same line (sorry, no good examples. I > fixed the problems and have since forgotten the specifics). > > I need to get some idea of how reliable the 'C' compiler in CCS v2.0 > is, and whether I can consistently generate working code with it when > importing pieces from other projects. Currently I am still using CCS > v1.2 for my projects. I shouldn't have to step through the assembly > code generated by the 'c' compiler to confirm that it has properly > done its job (note, I am not using any optimizations for fear that > this will further obfuscate any problems). > > So has anyone had similar problems, and solved them by switching to > CCS v2.0? Or is there a guide that I don't know of that makes it clear > what kinds of standard 'c'-like things I shouldn't be trying with the > CCS compilers? > > Thanks, > > Brian > > ----------------------------------------------------- > Brian C. Lane (W7BCL) Programmer > www.shinemicro.com RF, DSP & Microcontroller Design > > _____________________________________ |
|
|