This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: eCos + LPC21xx footprint


Hello
would such a change in arm/vectors.S be to intrusive?
The 'unused' vector entry is used by LPC's inflash bootloader to detect whether a valid image is present. The value is the checksum of the vector table, fixed since that table doesn't change. If not the download sequence starts else it assumes there's a program and it runs it.
The Philips hostside (Windows only) downloader modifies the images it downloads on the fly, but on linux I chose to put the value in the image and not add more code to the loader I wrote.
This means that it does not need to be calculated by every different download method :
even redboot would not need to do anything extra when writing the flash.


comments?

--- orig/packages/hal/arm/arch/current/src/vectors.S
+++ mod/packages/hal/arm/arch/current/src/vectors.S
@@ -206,7 +206,7 @@
         ldr     pc,.software_interrupt          // 0x08 start && software int
         ldr     pc,.abort_prefetch              // 0x0C
         ldr     pc,.abort_data                  // 0x10
-        .word   0                               // unused
+#ifdef CYGPKG_HAL_ARM_LPC2XXX
+        .word   0xB4405F62                      // used by LPC2XXX bootloader, 32 bit
+#endif
checksum of the int vectors should be 0
         ldr     pc,.IRQ                         // 0x18
         ldr     pc,.FIQ                         // 0x1C


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]