Jump to content

CCS and MSP430F541xA issues [SOLVED]

Recommended Posts

I am running into some problems with CCS. I have a program that is under 5k and uses ~1200 bytes of RAM.

When I increase couple of arrays by about 200 bytes, the program compiles but then it does not let me debug.

It appears to be running, but it isn't (see attached pic.)


Clearly, there's some kind of limit here, but what?

I had code size limited version of CCS, so I have activated my license (after 2 years :smile:,) it's a full version now.

I have tried F5418A and F5419A, same results, LaunchPad and FET430UIF, still same results.



Link to post
Share on other sites
  • 3 weeks later...

Found the problem (thanks to Jens-Michael Gross from e2e.)


As it turns out, _auto_init was taking too long and WDT was resetting MCU before debugger could get to main breakpoint.


Adding _system_pre_init and disabling WDT before _auto_init fixed my issue.

int _system_pre_init( void )
   return 1;
Link to post
Share on other sites

There's another way


CCS (I am not sure if I should use .TI.noinit, but using .noinit or any other section does not work)

#pragma DATA_SECTION(myVar, ".TI.noinit");
unsigned char myVar[2][512];


__no_init unsigned char myVar[2][512]; 

mspgcc (see pabigot's note 2 posts below)

unsigned int myVar[2][512] __attribute__ ((section(".noinit")));
Link to post
Share on other sites


mspgcc (not sure about .noinit, see CCS example)

unsigned int myVar[2][512] __attribute__ ((section(".noinit")));


This works, but is unnecessary on mspgcc: the C runtime (CRT) code that zeroes bss and copies statically initialized data resets the watchdog while it's working.  The watchdog is also reset between each static constructor or destructor call.


You can also globally disable the watchdog with -mdisable-watchdog, in which case it's disabled before any of the CRT stuff gets going.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...