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

Placing many arrays of consts at fixed address of Flash

I read some topics about placing a const to fixed address by linker. The method is to locate all section, isn't it?
My problem is to locate 7 arrays of const(predefined): a1[50]..a7[50]. I want to place a1[] at 0xC07D00, a2[] at 0xC07E00, a3[] at 0xC07F00 and etc. So, how i can do it?
Is it true that theese arrays will be united in NCONST class? Thanks!

Parents
  • The only way I know how to do this is in "C" is to create a seperate file for each near const array that you want to create. Then add some definitions under the L166 locate, user sections (using the filename for each seperate array, a1.c a2.c and so on) then add ?NC?A1%NCONST(0C07E00h),?NC?A2%NCONST(0C07F00h), and so on for each entry...

    They should all be united into the NCONST class since you are under 64K. You should see a default linker setting of NCODE (0xC00000-0xC0FFFF).

    -Chris

Reply
  • The only way I know how to do this is in "C" is to create a seperate file for each near const array that you want to create. Then add some definitions under the L166 locate, user sections (using the filename for each seperate array, a1.c a2.c and so on) then add ?NC?A1%NCONST(0C07E00h),?NC?A2%NCONST(0C07F00h), and so on for each entry...

    They should all be united into the NCONST class since you are under 64K. You should see a default linker setting of NCODE (0xC00000-0xC0FFFF).

    -Chris

Children