Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] How to locate a 'const' in flash

2006-03-31 by 42Bastian Schick

> 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.

AFAIK there is no "standard" way to achieve this. But with all the 
different compilers I use,
static const int a = 30;
works.

Or use a pragma to place a into DATA_C (see IAR manual).

-- 
42Bastian

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.