|
spinnaker_tools (BMP) latest
SpiNNaker BMP firmware
|
System bootstrap code for BMP LPC1768. More...
Functions | |
| static void | die (uint32_t code) |
| Curl up and die. | |
| void | boot_proc (void) |
| Reset (boot) handler. | |
| static void | mem_copy (uint32_t *restrict to, const uint32_t *restrict from, uint32_t n) |
| Copy memory by words. | |
| static void | refresh_wdt (void) |
| Refresh watchdog timer. | |
| static void | flash_copy (uint32_t to, uint32_t from, int32_t size, int32_t arg4) |
| Copy data into flash. | |
Variables | |
| uint32_t | RO_LENGTH |
| Size of this boot image. | |
| uint32_t | STACK_LIMIT |
| Stack top. | |
| const uint32_t | pad = 0xdeaddead |
| Fudge to force 4 byte alignment. | |
| static const uint32_t | led_bit [] = {LED_3, LED_4, LED_5, LED_6} |
| LED definitions. | |
| static const boot_vec_t | boot_data |
| Cortex M3 vector table. | |
System bootstrap code for BMP LPC1768.
|
static |
Curl up and die.
The top LED is turned on (Red on Spin5) and the code is put on the next 4 LEDs (Green on Spin5).
This is usually called from within code in this source file in which case the WDT is inactive and "die" will never exit. When "flash_copy" is called from the main code and the WDT is active then the WDT will trigger after the WDT period.
| [in] | code | What to show on the LEDs for diagnostic purposes |
|
static |
Copy memory by words.
| [in] | to | Where to copy to |
| [in] | from | Where to copy from |
| [in] | n | Number of words to copy |
|
static |
Copy data into flash.
| [in] | to | Where to copy data to |
| [in] | from | Where to copy data from |
| [in] | size | Number of bytes to copy; should be multiple of 4kB |
| arg4 | ignored |
|
static |
Cortex M3 vector table.
This short one lives at the bottom of flash memory. It's only used for booting. The checksum at word 7 needs to be computed and filled in by someone. The "openocd" JTAG application can do this as can "sum.pl"