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.

CCSv5 - printf not working full/nofloat, works minimal

Other Parts Discussed in Thread: MSP430F5438

I have a working project imported from v4 to v5 (on a new clean win7 platform as well).  No real problems importing and everything compiles and loads into my target as well, but (s)printf only works in minimal mode (I need at least nofloat for my app).  An example:

sprintf(s,"%d\n\r",5213);

stopping and examining s after the call to sprintf the number doesn't convert correctly s[1..3]:

With  --printf_support=minimal (works)

s char[80] 0x5BAC (Hex) 0x5BAC

[0] char 0x35 (Hex) 0x5BAC

[1] char 0x32 (Hex) 0x5BAD

[2] char 0x31 (Hex) 0x5BAE

[3] char 0x33 (Hex) 0x5BAF

[4] char 0x0A (Hex) 0x5BB0

[5] char 0x0D (Hex) 0x5BB1

[6] char 0x00 (Hex) 0x5BB2

 

With  --printf_support=nofloat (doesn't work)

s char[80] 0x5BAC (Hex) 0x5BAC

[0] char 0x35 (Hex) 0x5BAC

[1] char 0xFF (Hex) 0x5BAD

[2] char 0xFF (Hex) 0x5BAE

[3] char 0xFF (Hex) 0x5BAF

[4] char 0x0A (Hex) 0x5BB0

[5] char 0x0D (Hex) 0x5BB1

[6] char 0x00 (Hex) 0x5BB2

 

I saw a previous post saying MSP430 printf problems are almost always stack space related, my original setting (default I think) was 160 - I changed to 1000 with no help.

 

Here are all the build switches.

Compiler:

-vmspx --abi=coffabi -O0 -g --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430/include" --define=__MSP430F5438__ --diag_warning=225 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --large_memory_model --plain_char=signed --printf_support=minimal -k --c_src_interlist --asm_listing

Linker:

-vmspx --abi=coffabi -O0 -g --define=__MSP430F5438__ --diag_warning=225 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --large_memory_model --plain_char=signed --printf_support=minimal -k --c_src_interlist --asm_listing -z -m"Tug430.map" --stack_size=1000 --heap_size=1000 --use_hw_mpy=F5 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430/lib" -i"C:/ti/ccsv5/tools/compiler/msp430/include" --reread_libs --warn_sections --rom_model

Thanks.