This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi All,
I'm using the MSP430F5438A and have just upgraded to Code Composer Studio V5.1.
The sprintf functionality that I was happily using under CCS V4 is now no longer working and of course that also rings true for printf.
The problems I am seeing can be shown with a few modifications to the Hello World example.
#include <stdio.h>
void main( void )
{
printf("Hello World! %i\n", 123 );
printf("Hello World! %u\n", 123 );
printf("Hello World! %lu\n", 123 );
}
Only the first character from each parameter is copied into the string and printed so the results are something like:
Hello World! 1cÿ
Hello World! 1cÿ
Hello World! 1fÿÿÿÿÿÿEÅ
I have set the "Level of printf support required" to FULL
And have also increased the default heap size which of course is needed for any printf functionality.
Many thanks in advance for any help.
I can reproduce this issue and it seems related to the code generation tools included in CCS 5.1. If I change my compiler version to use a previous version like 3.3.3, the printf works properly. I will submit a bug report for this against the codegen tools.
In the meantime, you can work around it by setting your project to use v3.3.3 of the compiler (which is likely the version in your CCSv4 installation). You can set a different version of the compiler tools by using the same procedure as in CCSv4: http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection#CCStudio_4.0
The bug tracking # for the printf issue is SDSCM00042077. You can track the status of the bug using the SDOWP link in my signature.
Hello!
I have the same problem with the code gen tools and tried to downgrade to 3.3 but without success.
How do I do this with ccs5.1.?
I tried the following:
Help->Install New Software
Work with: Code Generation Tools Updates
Check Code Generation Tools MSP430 3.3
After this I get an "unsupported Install" message. I am forced to launch another update program. But there seems to be no relevant download and search for relevant downloads brings Network errors, because none of the files are found on the mirror servers.
Regards - Michael
Michael Dazer said:I tried the following:
Help->Install New Software
Work with: Code Generation Tools Updates
Check Code Generation Tools MSP430 3.3
After this I get an "unsupported Install" message. I am forced to launch another update program. But there seems to be no relevant download and search for relevant downloads brings Network errors, because none of the files are found on the mirror servers.
Updating codegen tools from 5.1 is unfortunately not working at the moment. To get CGT 3.3.3, the easiest way at the moment, would be to download and install CCS4.2.4 in a separate folder. http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_4_Downloads
You can download the DVD image and install just the MSP430 component.
Then from CCS 5.1, you can point to the codegen tools from CCS 4.2.4 and have it use version 3.3.3 (similar to what is described here: http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection#CCStudio_4.0)
Hello,
your bug-tracking-system told me not to use the linker options "--use_hw_mpy=32" or "--use_hw_mpy=F5".
Nevertheless I got still the same problems with printf support.
Regards - Michael
PS: Not the same problems....
I got no output at all. Code after printf is not reached.
michael dazer86758 said:your bug-tracking-system told me not to use the linker options "--use_hw_mpy=32" or "--use_hw_mpy=F5".
michael dazer86758 said:PS: Not the same problems....
I got no output at all.
My heap size was 400 with no_float option. I think enough for a simple hello world.
I will try the new version of codegen tools.
Thank you
Had a similar problem with an MSP430F5619 which I resolved by changing the use_hw_mpy option from F5 to blank. Seems the latest library's printf handling of intergers must perform an integer multiply which fails if the wrong hardware multiply option is selected.
#include <msp430.h>
#include <stdio.h> //////////////!!!!!!!!!!!!!!!
char value[20];
unsigned char x;
sprintf(value,"%d ", x);
glcd_text57(10, 30, value ,1,1);
enjoy....