Hi,
I am currently working on OMAP3530 based Board from Mistral Solutions. I am using CCS v4 and XDS510 PP+ Jtag Emulator for debugging .
I am trying to port a RTOS onto the board. The RTOS does not provide any memory protection hence MMU is not enabled in my case.
I find problem with setting up Vector Table for my RTOS. This is how i approached.
Code snippet for setting up Vector Table(This works for TMS320DM320 with ARM926-ejs):
Code
Snippet:
jumpaddr =
0x80000000(ie start of SDRAM)
void
vector_setup(int jumpaddr)
{
unsigned int *da;
int i;
da=(unsigned int *)0x00000000;
for (i=0; i<8; i++)
unsigned int *da;
int i;
da=(unsigned int *)0x00000000;
for (i=0; i<8; i++)
{
*da=0xE59FF018; opcode for ldr pc, [pc + 0x18]
da++;
}
for (i=0; i<8; i++)
*da=0xE59FF018; opcode for ldr pc, [pc + 0x18]
da++;
}
for (i=0; i<8; i++)
{
*da=jumpaddr;
da++;
jumpaddr+=4;
}
}
*da=jumpaddr;
da++;
jumpaddr+=4;
}
}
After the Execution
of code snippet Memory will look like
Address Content
0x0000_0000
: 0xE59FF018
0x0000_0004
: 0xE59FF018
0x0000_0008
: 0xE59FF018
0x0000_000C
: 0xE59FF018
0x0000_0010
: 0xE59FF018
0x0000_0014
: 0xE59FF018
0x0000_0018
: 0xE59FF018
0x0000_001C
: 0xE59FF018
0x0000_0020 : 0x80000000
0x0000_0024 : 0x80000004
0x0000_0028 : 0x80000008
0x0000_002C : 0x8000000C
0x0000_0030 : 0x80000010
0x0000_0034 : 0x80000014
0x0000_0038 : 0x80000018
0x0000_0040 : 0x8000001C
Content of 0x80000000 to 0x8000001C will have Branches
to respective handlers.
When i
try to write to memory 0x00000000 i get an exception and PC goes to
0x0000000C , where there is only dead code. (0x0BAD0BAD).
In the case of TMS320DM320 the 0x00000000 contained instruction TCM. Since there is no MMU when i write to 0x00000000 it goes to instruction TCM and everything works fine.
Why i get exception in OMAP3530? What is located in 0x00000000? How will i set up vector table? Is 0xFFFF0000 possible?
Please suggest a solution..
Regards
Jack