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

Last used memory in ROM after linking

I appologize because my question was probably here many times but I haven't found any solution.
How could I save to some constant in Flash memory the very last used position by linker automaticaly without reading the map file? I mean some constant that is known by a linker and usable during compilation.

Regards

Igor

Parents
  • 1) Create a small assembly code segment holding a single, labelled DB.

    2) Tell the linker to locate this segment as the last of all. The exact method to do this differs between BL51 and LX51. The manual's your friend.

    3) use the value of that symbol (in C, its equivalent is the address of an extern unsigned char variable) to know the end of code.

Reply
  • 1) Create a small assembly code segment holding a single, labelled DB.

    2) Tell the linker to locate this segment as the last of all. The exact method to do this differs between BL51 and LX51. The manual's your friend.

    3) use the value of that symbol (in C, its equivalent is the address of an extern unsigned char variable) to know the end of code.

Children