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

fetch self-define section start address

Hell all,

I want to fetch the section start and end address, that defined by myself in my project rather than in the .sct file.

Example: I define section ".code" use #pragma section(".code"), how do i get the start and end address.

If the section name no the symboe '.', only "code ", maybe i can get the address through Load$$code$$base, but at here i can't operate it.

Can you help me or provide a connection that explains how to handle it.

Very Thanks!

  • I don't think you can do it theoretically.

    At compilation time, compiler doesn't know at all which module or code section goes where. It is the job of the linker to place different sections into memory regions defined by the scatter file. 

    Thus, I don't think it is possible to "fetch" or "get" the start/end address of a section by writing some code.