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

Programming tables in flash memory, Philips LPC21xx family

Hello,

I'm trying to figure out how to do something and I'm getting no where. Hope someone here can point me to some info on this...

I have a program that uses three different short int 16 x 16 tables. My code is very stable and I don't need to change it much any more. What I'd like to find out is if there is a way to use Philip's flash tool to just program the tables and not the program.

The tables change daily and I'm the only guy who has a seat of the Keil ARM tools. It's a real pain for the guys who are doing the testing to have to email me a new table set, me compile it, the send them back a hex file for them to flash the uC.

Does anyone have any tips or sample code on how to do this (if it is possible)? I'm a hardware engineer, so make it simple :)

Parents
  • > You can use the _at_ attribute to locate
    > any variable at a fixed address. This
    > includes also arrays.
    >
    > Example:
    > const int myval _at_ 0x20000 = 0x1234;
    > I suggest to contact your local Keil
    > support for further questions.

    THAT's what I've been looking for!!!
    Thanks Reinhard!

    I may not have been clear, but I've known that I needed to fix the tables in flash at a certain location but I was not sure as to how to do it.

    Is the linker smart enough not to use the memory locations I set using the _at_ attribute's ?

    I've tried several times to read the linker script documentation to figure out how to do it there but after several minutes of reading I go into seizures and loose all muscle control. It isn't pretty.

    Thanks for the tip!

Reply
  • > You can use the _at_ attribute to locate
    > any variable at a fixed address. This
    > includes also arrays.
    >
    > Example:
    > const int myval _at_ 0x20000 = 0x1234;
    > I suggest to contact your local Keil
    > support for further questions.

    THAT's what I've been looking for!!!
    Thanks Reinhard!

    I may not have been clear, but I've known that I needed to fix the tables in flash at a certain location but I was not sure as to how to do it.

    Is the linker smart enough not to use the memory locations I set using the _at_ attribute's ?

    I've tried several times to read the linker script documentation to figure out how to do it there but after several minutes of reading I go into seizures and loose all muscle control. It isn't pretty.

    Thanks for the tip!

Children
  • Is the linker smart enough not to use the memory locations I set using the _at_ attribute's?

    Yes.

    That is, if you locate variables using _at_ the segment that is created is an absolute segment located at the specified address. The linker understands this and does not locate other segments in the same memory.

    Jon