This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Scatter file for Cortex-M0 LPC11xx

Hi everybody,

My question is regarding a Cortex-M0 NXP's LPC1114/301.

I am having trouble with the initialization sections that sets the initial values of variables. For example:

int x = 20;

int main(void)
{ if(x==20) do_something();

.....

}

When I run this code, the value of x is undefined and has actually a random value. I know I have to copy the etext section to edata, and also initialize the bss section to 0. But how do I do this in Keil with a scatter file + startup file in assembler? The default startup file from Keil for the LCP1114 doesn't do it...

Thanks in advance,

R.

Parents Reply Children
No data