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

Absolute memory addressing with C166

How can I place constants and variables to specific addresses in the FLASH and RAM ?
Is there an equivalent for the C166 compiler like the _at_ <addr> which exists for the C51 compiler.

I am sure there must be a more comfortable way instead of declaring the identifiers in a stand-alone C module and using the location control directives.

Thanks for any comments and hints.
Chris Schnyder

Parents
  • Thanks for your info.
    Finally I created a specific C source file, where I declare all the constants I want them to have at a defined address in the FLASH. Then I adjusted the linker settings accordingly.
    It works pretty well like that, but I am still wondering why C166 doesn't feature a mechanism which doesn't require to do this pain of workaround at file level.
    Chris

Reply
  • Thanks for your info.
    Finally I created a specific C source file, where I declare all the constants I want them to have at a defined address in the FLASH. Then I adjusted the linker settings accordingly.
    It works pretty well like that, but I am still wondering why C166 doesn't feature a mechanism which doesn't require to do this pain of workaround at file level.
    Chris

Children