ARM7 vector 0x14 issue
Sergei Gavrikov
w3sg@SoftHome.net
Sat Feb 3 20:37:00 GMT 2007
Hello list,
One ARM7 platform (LPC2XXX targets) need itself in a properly setup
the ARM unused vector (ARM7 vector at 0x14). A possibility to setup
that value was entered in hal/arm/arch/current/src/vectors.S. To give
LPC2XXX customers a way to manipulate that value, new CDL was entered
in lpc2xxx/var. Well, that was not critical for me. Such a fixating
of ARM table is a care my programmer of lpc2xxx parts. The 'openocd'
jtag server does same job for the lpc2xxx parts too. But if folk use
other tools or LPC2000 Flash utility from Philips, they need in this fix.
Thanks Gary Thomas for his idea and Wang Cui for his desire to improve
a life of lpc2xxx customers. The patch was tested on the Olimex
LPC-{E,H,L}2294 boards.
Sergei
-------------- next part --------------
diff -ur hal/arm/arch/current/ChangeLog hal/arm/arch/current/ChangeLog.new
--- hal/arm/arch/current/ChangeLog
+++ hal/arm/arch/current/ChangeLog.new
@@ -1,3 +1,8 @@
+2007-02-03 Sergei Gavrikov <sg@sgs.gomel.by>
+
+ * src/vectors.S: Added a possibility to fix ARM vector 0x14
+ (unused vector). Some platforms need itself in that.
+
2007-01-09 Sergei Gavrikov <sg@sgs.gomel.by>
* src/arm-stub.c: Added string.h header (`memcpy' declaration).
diff -ur hal/arm/arch/current/src/vectors.S hal/arm/arch/current/src/vectors.S.new
--- hal/arm/arch/current/src/vectors.S
+++ hal/arm/arch/current/src/vectors.S.new
@@ -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
-------------- next part --------------
diff -ur hal/arm/lpc2xxx/var/current/ChangeLog hal/arm/lpc2xxx/var/current/ChangeLog.new
--- hal/arm/lpc2xxx/var/current/ChangeLog
+++ hal/arm/lpc2xxx/var/current/ChangeLog.new
@@ -1,3 +1,12 @@
+2006-02-03 Sergei Gavrikov <sg@sgs.gomel.by>
+
+ * 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 <andy@grapevinetech.co.uk>
* src/lpc2xxx_misc.c: Fixed issue with VPBDIV initialisation on
diff -ur hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl.new
--- hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl
+++ hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl.new
@@ -112,6 +112,24 @@
}
}
+ # 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
More information about the Ecos-patches
mailing list