hello,
I'm using a XE164 µC.
I've just read http://www.keil.com/support/docs/942.htm and have a following question. I'm writing my own bootloader and using as a help the APNT138. I want to write my code in C. The example 942.htm uses #pragma LARGE // only required when you are using the SMALL memory model! #pragma RENAMECLASS(FCODE=FLASH_CODE)
and i tried to use
#pragma SMALL #pragma RENAMECLASS (NCODE = FLASH_CODE)
in the L166 locateer i have
?PR?PFLASH%FLASH_CODE(0xE00000)[!]
after I have compiled it all my NCODE data(all my functions...) was located at the 0xE00000 and it was not what I wanted.
If i write an a66 file like
$SEGMENTED CASE $INCLUDE (XE16x.INC)
PUBLIC UpdatePFlashFromRAM
?PR?PFLASH section code 'FLASH_CODE'
UpdatePFlashFromRAM proc near
;
UpdatePFlashFromRAM endp
?PR?PFLASH ENDS END
it works perfect.
Could somebode explain if it possible to realize it in C like in assembler(without relocating all ncode data at the 0xE00000) or in C it is only possible using LARGE memory model.
Thank you very much, Serg