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) [!]
Take a look to: http://www.keil.com/download/docs/xc16x_iap-flash.zip.asp You may even run the code in the simulator when you are using the following command:
map 0xE00000, 0xE007FF exec read write
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.