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

Locating C code

I want to locate a C function at a specific location in the memory. How can I do that?

Regards,
Gaurav

Parents
  • Well the reason I want to do it is specific to my SoC design.
    I do not want to place the function at a specific location but I want to avoid certain memory range, specifically the 0-4K range. The reason is that I need switch the 0 to 4K mapping back and forth between the RAM and Flash for accesing the flash. My code is executing from RAM. Hence I need to keep the flash access code in a location other than 0K to 4K range.

    I know I can do it my placing the file such that it is compiled last , but that is not safe ...in case my complete binary is less than 4K size.

    Regards,
    Gaurav

Reply
  • Well the reason I want to do it is specific to my SoC design.
    I do not want to place the function at a specific location but I want to avoid certain memory range, specifically the 0-4K range. The reason is that I need switch the 0 to 4K mapping back and forth between the RAM and Flash for accesing the flash. My code is executing from RAM. Hence I need to keep the flash access code in a location other than 0K to 4K range.

    I know I can do it my placing the file such that it is compiled last , but that is not safe ...in case my complete binary is less than 4K size.

    Regards,
    Gaurav

Children