Not applicable
Nov 24, 2014
02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 24, 2014
02:45 AM
Hi,
I'm running DAVE-3.1.10 (gcc), for ARM XMC4500.
I would like to link a large number of global variables to a certain RAM section in memory.
The variables does not need to be initialized or zeroed at startup.
Can this be done with a #pragma directive for the whole group,
instead of a declaring __attribute__((section("name"))) for each variable?
I'm running DAVE-3.1.10 (gcc), for ARM XMC4500.
I would like to link a large number of global variables to a certain RAM section in memory.
The variables does not need to be initialized or zeroed at startup.
Can this be done with a #pragma directive for the whole group,
instead of a declaring __attribute__((section("name"))) for each variable?
2 Replies
Not applicable
Nov 24, 2014
05:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 24, 2014
05:58 PM
Hi Engztrom,
DAVE3 is using GNU compiler which has a limited support on #pragma directives.
So, you could only use the _attribute_ to declare your variable.
DAVE3 is using GNU compiler which has a limited support on #pragma directives.
So, you could only use the _attribute_ to declare your variable.
Not applicable
Nov 25, 2014
01:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 25, 2014
01:12 AM
Well, it doesn't look so bad if disguised in a #define...
#define DATA2 __attribute__ ((section ("ETH_RAM")))
:
DATA2 float ChnFactor[MAXCHN];
DATA2 float ChnOffset[MAXCHN];
:
#define DATA2 __attribute__ ((section ("ETH_RAM")))
:
DATA2 float ChnFactor[MAXCHN];
DATA2 float ChnOffset[MAXCHN];
: