able to debug IAR with NGX4330 still missing board loader though

This commit is contained in:
hathach
2014-04-07 18:25:04 +07:00
parent a2bb681389
commit 31a10c9780
4 changed files with 20 additions and 20 deletions

View File

@@ -1,11 +1,11 @@
FUNC void Setup (unsigned int region) {
region &= 0xFFFF0000;
SP = _RDWORD(region); // Setup Stack Pointer
PC = _RDWORD(region + 4); // Setup Program Counter
_WDWORD(0xE000ED08, region); // Setup Vector Table Offset Register
region &= 0xFF000000;
_WDWORD(0x40043100, region); // Set the shadow pointer
_WDWORD(0xE000ED08, 0); // Set the vector table offset to 0
SP = _RDWORD(region); // Setup Stack Pointer
PC = _RDWORD(region+4); // Setup Program Counter
}
//LOAD "Board NGX4330\\host_os_none.axf" INCREMENTAL
LOAD %L INCREMENTAL
Setup(__scatterload); // Get ready to execute image in SRAM or whatever region it is in g,main