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

const locating in code space

I am trying to specify the flash address location for a large lookup table (300k). Can I specify a user class for this? How do I define it and reference the class from within my c code?

Jeff

  • I'm not sure if the 166 and 8051 tools are the same, but I'm guessing this might be very close.

    Put the table in its own source file and compile your project. Then look at your map and find the name for the source file. For example if the source is called presetstub.c the code stuff in that file will be named something like this:

    ?CO?PRESETSTUB

    Now take that name and use it in the locate command. Say you want it to exist at 0xD000, you would add this line:

    ?CO?PRESETSTUB(D000h)