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.
With the same code base, we are looking to use the MSP430 C/C++ compiler v4.0.0,
version 3v32 works fine.
With v4.0.0, vsnprintf and sprintf give strange outputs.
printing using vsnprintf an unsigned char using %d with a value of say 254, results in the first character being 2, but the next two being 255 or 0xFF, which are displayed in the console as 2??
printing using sprintf an unsigned short using %d with a value of 4800, results in again the first character being 4, but the next three also being 255 or 0xFF.
The compile setting lists the printf support as no_float
Make sure you have #include <stdio.h> . Please check out other related tips in this wiki article.
Thanks and regards,
-George
You are probably running afoul of SDSCM00042077, which is fixed in version 4.0.1. That symptom is caused by a bug in the 64-bit multiply RTS function for targets which have a 32-bit hardware multiply (--use_hw_mpy=32 or --use_hw_mpy=F5).
Yes it appears that this is the SDSCM00042077 bug, if I set the printf to minimal then the problem goes away.
The fix is then to get the patch from 4.0.0 to 4.01.
The update software or install new software does not appear to mention an update to 4.0.1, the installation details from the CC5 about box states the MSP430 Compiler Tools are at version 4.0.0, but according to the release notes that comes with the CC5 installation this should be 4.0.1.?