Hi,
I'm trying to print out on the UART of an MSP430F2418 debug messages of my code. I am formatting those messages using vsnprintf, but whenever I'm trying to print a message which contains some formatting, e.g: %f %d or %lX, my program silently fails.
I'm using pretty much the same code on an MSP430F5438A and I had the same problem, but I fixed it by allocating more stack and heap size.
However, for the 2418 it doesn't work, the program keeps failing over and over again, most probably due to a stack overflow or due to lack of memory for the heap.
I'm using the following settings:
I include <stdio.h> in the file i use to call vsnprintf.
I put a "\n" at the end of each line I want to print to clear the buffer.
Compiler options:
--silicon_version=mspx --large_memory_model --printf_support=full
Linker options:
--use_hw_mpy=F5 --stack_size=1024 --heap_size=1024 --rom_model
In my linker script I allocate the RAM as follows:
    //------------------------------------------------------------------------
    //  Declare RAM usage
    //------------------------------------------------------------------------
    .bss     : {} run = RAM, RUN_START(bss_start), SIZE(bss_size)
    .cio     : {} run = RAM
    .sysmem  : {} run = RAM, RUN_START(sysmem_start), SIZE(sysmem_size)
    .stack   : {} run = RAM(HIGH), RUN_START(stack_start), SIZE(stack_size)
Does anyone have any idea why this happens?
 
				 
		 
					 
                           
				