Hello Forum, I've written a program, which extensively uses PEC, therefore I need a lot of ram in segment 0. To do this, I've modified the startup code to including a part, which copies the vector table from address 0..0x110 to ram. I'm using C166, a Phytec phyCORE-168 board and Phytec Flashtools 16W. I've told the compiler that my board got ram from 0x110 with a size of 0xCEF0 and from 0x10000 with a size of 0x30000. Also I told it got rom from 0x100000 with a size of 0x40000. The compiler stores a JMPS into rom at 0x100000 at address 0. Due to mirroring of the rom, I think, this jump must work just fine. My problem is, that Flashtools doesn't want to program that hexfile, saying that rom isn't empty. I assume that a problem arise due to the vector table still ranging from 0..0x110 and the rom at 0x100000, which of course actually falls into the same physical rom area. Should I say to the compiler that rom on my boards starts at 0x100110 instead of 0x100000? I think then I could tamper with the hexfile to put the vector table at 0x100000 instead of 0x0. Is there a more elgantly way than this? Thanks - Peter
You can have the Keil toolset locate the interrupt vector table at any memory location. Try Options for Target -> L166 Misc -> Interrupt Vector Table Address. Regards, Mike.
Fine! It seems it works now. Thanks.