Mercurial > ecos
changeset 2490:1020a0217955
* src/vectors.S:
* include/arch.inc:
* include/hal_arch.h: Introduced CYGPKG_HAL_FR30_LMA_OFFSET for supporting
remapping a flash chip during initialisation.
| author | asl |
|---|---|
| date | Fri, 11 Jul 2008 17:59:26 +0000 |
| parents | c95d59b20030 |
| children | 24cb6e989e05 |
| files | packages/hal/fr30/arch/current/ChangeLog packages/hal/fr30/arch/current/include/arch.inc packages/hal/fr30/arch/current/include/hal_arch.h packages/hal/fr30/arch/current/src/vectors.S |
| diffstat | 4 files changed, 28 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/fr30/arch/current/ChangeLog +++ b/packages/hal/fr30/arch/current/ChangeLog @@ -1,3 +1,10 @@ +2008-07-01 Lars Poeschel <larsi@wh2.tu-dresden.de> + + * src/vectors.S: + * include/arch.inc: + * include/hal_arch.h: Introduced CYGPKG_HAL_FR30_LMA_OFFSET for supporting + remapping a flash chip during initialisation. + 2007-07-09 Lars Poeschel <larsi@wh2.tu-dresden.de> * src/context.S:
--- a/packages/hal/fr30/arch/current/include/arch.inc +++ b/packages/hal/fr30/arch/current/include/arch.inc @@ -185,6 +185,16 @@ #endif +#------------------------------------------------------------------------------ +# Difference of the flash memory from the linkers LMA (loadmemoryaddress) after +# the new mapping in (mapping is done in hal_fr30_ram_startup_trampoline). + +#ifndef CYGPKG_HAL_FR30_LMA_OFFSET + +#define CYGPKG_HAL_FR30_LMA_OFFSET 0x0 + +#endif + #endif // ifndef CYGONCE_HAL_ARCH_INC # end of arch.inc
--- a/packages/hal/fr30/arch/current/include/hal_arch.h +++ b/packages/hal/fr30/arch/current/include/hal_arch.h @@ -128,7 +128,7 @@ externC cyg_uint32 hal_msbit_index(cyg_u (_regs_)->r[04] = (CYG_HAL_FR30_REG)(_thread_); /* R4 = arg1 = thread ptr */ \ (_regs_)->pc = (CYG_WORD)(_entry_); /* PC = entry point */ \ (_regs_)->ps = (CYG_HAL_FR30_REG)0x1f0030; /* 0x000F0030; set flags */ \ - (_regs_)->tbr = (CYG_HAL_FR30_REG)0xffc00; /*system standard tbr value*/ \ + (_regs_)->tbr = (CYG_HAL_FR30_REG)0x10ffc00; /*system standard tbr value*/ \ (_regs_)->rp = (CYG_HAL_FR30_REG)0x0; /* return pointer = 0x0 */ \ (_regs_)->ssp = (CYG_HAL_FR30_REG)0x0; /* R4 = arg1 = thread ptr */ \ (_regs_)->usp = (CYG_HAL_FR30_REG)(_regs_); /* r15 = USP = top of stack*/ \
--- a/packages/hal/fr30/arch/current/src/vectors.S +++ b/packages/hal/fr30/arch/current/src/vectors.S @@ -110,24 +110,25 @@ 2: ble:d 2b st r0, @r13 - #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM) # In a ROM booted system, we also need to copy the data section # out to the RAM. - ldi:32 #__rom_data_start - 4, r11 - ldi:32 #__ram_data_start - 4, r13 - ldi:32 #__ram_data_end - 8, r12 + + ldi:32 #__rom_data_start - 4 + CYGPKG_HAL_FR30_LMA_OFFSET, r11 + ldi:32 #__ram_data_start - 4, r9 + ldi:32 #__ram_data_end - 8, r10 3: add #0x4, r11 - add #0x4, r13 + add #0x4, r9 ld @r11, r0 - cmp r12, r13 + cmp r10, r9 ble:d 3b - st r0, @r13 + st r0, @r9 #endif + # Set up the stacks # Begin with interrupt (system) stack @@ -158,7 +159,6 @@ 3: ldi:32 #hal_platform_init, r11 call @r11 - #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS // This is here so we can debug the constructors. .extern initialize_stub @@ -181,6 +181,7 @@ 3: call breakpoint #endif + .extern cyg_start ldi:32 #cyg_start, r11 call @r11 @@ -392,6 +393,7 @@ hal_exception_return: andccr #0xdf reti + #============================================================================== # Exception trampolines # TBR table points to these short code sequences here that push the vector
