Discussion Forum

Executing in a Rom mirror

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Peter Muthesius
Posted
4-Dec-2001 18:50 GMT
Toolset
C166
New! Executing in a Rom mirror
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
Read-Only
Author
Mike Kleshov
Posted
4-Dec-2001 20:26 GMT
Toolset
C166
New! RE: Executing in a Rom mirror
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.

Read-Only
Author
Peter Muthesius
Posted
5-Dec-2001 15:30 GMT
Toolset
C166
New! RE: Executing in a Rom mirror
Fine! It seems it works now. Thanks.

Next Thread | Thread List | Previous Thread Start a Thread | Settings