# HG changeset patch # User gthomas # Date 1170548202 0 # Node ID f0b2da61ab63608c8fc292ff6121a877ced2bc54 # Parent a49761badbf10abed4e91183070204cbbed23e85 Fix for boot vectors on LPC2xxx platforms - on behalf of Sergei Gavrikov and Wang Cui diff --git a/packages/hal/arm/arch/current/ChangeLog b/packages/hal/arm/arch/current/ChangeLog --- a/packages/hal/arm/arch/current/ChangeLog +++ b/packages/hal/arm/arch/current/ChangeLog @@ -1,3 +1,8 @@ +2007-02-03 Sergei Gavrikov + + * src/vectors.S: Added a possibility to fix ARM vector 0x14 + (unused vector). Some platforms need itself in that. + 2007-01-09 Sergei Gavrikov * src/arm-stub.c: Added string.h header (`memcpy' declaration). diff --git a/packages/hal/arm/arch/current/src/vectors.S b/packages/hal/arm/arch/current/src/vectors.S --- a/packages/hal/arm/arch/current/src/vectors.S +++ b/packages/hal/arm/arch/current/src/vectors.S @@ -206,7 +206,11 @@ ldr pc,.software_interrupt // 0x08 start && software int ldr pc,.abort_prefetch // 0x0C ldr pc,.abort_data // 0x10 +#ifdef CYGNUM_HAL_ARM_VECTOR_0x14 + .word CYGNUM_HAL_ARM_VECTOR_0x14 +#else .word 0 // unused +#endif ldr pc,.IRQ // 0x18 ldr pc,.FIQ // 0x1C diff --git a/packages/hal/arm/lpc2xxx/var/current/ChangeLog b/packages/hal/arm/lpc2xxx/var/current/ChangeLog --- a/packages/hal/arm/lpc2xxx/var/current/ChangeLog +++ b/packages/hal/arm/lpc2xxx/var/current/ChangeLog @@ -1,3 +1,12 @@ +2006-02-03 Sergei Gavrikov + + * cdl/hal_arm_lpc2xxx.cdl: Added CYGNUM_HAL_ARM_VECTOR_0x14. That + gives us a chance to correct a LPC2XXX program signature (ARM + unused vector at 0x14). The program signature is the two's + compliment of the checksum of the ARM7 vector table. Note: + you can quite overwrite that CDL value in your plf. startup + code (hal_platform_setup.h). + 2006-05-08 Andy Jackson * src/lpc2xxx_misc.c: Fixed issue with VPBDIV initialisation on diff --git a/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl b/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl --- a/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl +++ b/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl @@ -112,6 +112,24 @@ cdl_package CYGPKG_HAL_ARM_LPC2XXX { } } + # Important! Be very careful changing this value. That will always + # enter the LPC2XXX bootloader after reset and consequently will + # never run your code. You must know what you are doing. Look at + # arch. vectors.S for details. + cdl_option CYGNUM_HAL_ARM_VECTOR_0x14 { + display "ARM vector at 0x14" + flavor data + default_value 0xB4405F62 + legal_values 0 to 0xFFFFFFFF + description " + In order to detect if a valid program is present, every + user program must have a program signature. This signature + is a word-wide number that is stored in the unused + location in the ARM7 vector table at 0x00000014. The + program signature is the two's compliment of the checksum + of the ARM vector table." + } + cdl_option CYGNUM_HAL_ARM_LPC2XXX_VPBDIV { display "VPB clock divisor" flavor data