Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: How to locate a 'const' in flash

2006-03-30 by ian.scanlon

--- In lpc2000@yahoogroups.com, "sam_pr" <sam_pr@...> wrote:
>
> I'm using the EWARM 431
> 
> When trying:
> 
> const int a = 30;
> 
> it locates 'a' in ram. I couldn't find an example where it is defined 
> as a flash const.
> 
> Please help.
> 
> Thanks
>

Check the linker file (.xcl).  You may be linking the project to load 
in RAM instead of flash. 

There are seperate linker files for RAM and FLASH for most of the parts
This will place code and constants on RAM (at 400000000+)

-DROMSTART=40000040
-DROMEND=40003FFF

This places code and contstants in ROM at 0x00000040:

-DROMSTART=00000040
-DROMEND=0000FFFF         

Ian

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.