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

Using C16x DPRAM

Hello;

How can I use DPRAM in XC167? I mean: how to correctly link a RAM memory area (in this derivative, 0xE0'0000 - 0xE0'1FFF) into one of the *CODE target classes?

My problem:

I followed all the linking steps in AppNote #138, including the SROM class and the FLASH_CODE section directives:

SROM (0xC00000-0xC1FFFF)

?PR?PFLASH%FLASH_CODE (0xE00000) [!]

I have also added in the External Memory #2:

RAM : 0xE00000 - 0x1FFF

But the debbuger still doesn't execute any code in this area (because uVision fits RAM External Memoryinto *DATA classes). If I add DPRAM as a "ROM" External Memory, my routine won't copy code to this area!


It seems like the ?PR?PFLASH section isn't working properly, has anyone a clue?

Thanks in advance,

Lucas

Parents Reply Children
  • Hmmm.... I'm still not sure about my application, which is highly adapted from the AppNote #138 and the program you stated.

    Does the "acces violation error" related to it mean this is a just debug error, "not automatically detected by µVision2" (as is in the HTML help) and it won't be an effective problem when I run this into the XC167?

    FYI, the routine does not copy buffer data into the address I want. I consider the main question is : is the On-Chip Program Flash Module fully simulated by uVision?

    Thanks in advance,

    Lucas

  • Use the MAP command as indicated in my answer to tell the uVision where you are using memory.

    uVision does not (yet) simuluation the in-System Flash programming feature of the XC16x devices.