I am trying to use app note 138 with one exception, I want to relocate C code, not assembly .... I believe my source file name "sram_x.c" defines the section name as SRAM_X, my problem is defining the class name. Anyone know how to do this? Jeff
Have you solved this yet? My first step was to try to re-build the example flash.uv2 but I get compiler errors with respect to: === paste begin === compiling Srom.c... C:\KEIL\C166\INC\REG167.H(370): error C155: 'DP8': invalid base address C:\KEIL\C166\INC\REG167.H(381): error C155: 'P8': invalid base address C:\KEIL\C166\INC\REG167.H(386): error C155: 'ODP8': invalid base address assembling Pflash.a66... Target not created === paste end ===
My source looked like this #include <reg161.h> /* special function register C161 */ #include <srom.h> /* allows code relocation to SRAM */ #include <intrins.h> #pragma LARGE #pragma RENAMECLASS(FCODE=SRAM_CODE) void wait (void) { /* wait function */ } void sram_code(void) { unsigned int i; while (1) { for (i=0;i<=0x40000;i++) { wait(); } } } I remember seeing the error you posted and as I recall the port was not present on the C161, so I commented it out. Hope that helps. Jeff