paul@150 | 1 | = Payload Start Routine = |
paul@150 | 2 | |
paul@150 | 3 | The `lib/start.S` file contains the start-up routine for a deployed payload. |
paul@150 | 4 | Its responsibilities are as follows: |
paul@150 | 5 | |
paul@150 | 6 | 1. To enable caching, if available. |
paul@150 | 7 | 1. To initialise a kernel stack for privileged routines to use. |
paul@150 | 8 | 1. To set up the globals pointer so that symbols can be looked up. |
paul@150 | 9 | 1. To [[../payload|initialise payload data]]. |
paul@150 | 10 | 1. To enter the main program of the payload. |
paul@150 | 11 | |
paul@150 | 12 | The start-up routine is positioned in the `.boot` section of the payload. |
paul@150 | 13 | |
paul@150 | 14 | Alongside the start-up routine are definitions of device configuration |
paul@150 | 15 | registers: `.devcfg0`, `.devcfg1` and `.devcfg2`. The actual values set for |
paul@150 | 16 | these registers should be defined in an application's `devconfig.h` file. |