We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want allocate the fix address for variables which are stored in flash. for example: const float engine_speed[6]={0,1000,2000,3000,4000,5000}; after compiling it, the address of these variables (engine_speed[6])is shown as bellow: C04000H engine_speed VAR --- NCONST ?NC?CR_MAP. if i want to fix the address of the variables into flash memory: C1F000H, how can i do? Thanks!
Hallo!
1. Look at: http://www.keil.com/support/man/docs/c166/c166_le_memtypes.htm www.keil.com/.../c166_ap_locatingsections.htm http://www.keil.com/support/man/docs/c166/c166_le_const.htm
2. The IDE already has shown you what is the difference (in two words, this is address range...):
FCONST (0xC00000-0xC1FFFF), NCONST (0xC04000-0xC07FFF),
3. Use explicit far/near keywords to make sure the IDE will put the array to FCONST/NCONST space
Regards, Nikolay.