FreeCalypso > hg > freecalypso-tools
comparison doc/Target-utils @ 529:30bec872824a
doc/Target-utils: flash-boot-test documented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 16 Jun 2019 18:42:44 +0000 |
parents | 81a3fc069301 |
children | 0b04f9b30ea1 |
comparison
equal
deleted
inserted
replaced
528:81a3fc069301 | 529:30bec872824a |
---|---|
237 abbw 0 30 1 | 237 abbw 0 30 1 |
238 | 238 |
239 flash-boot-test | 239 flash-boot-test |
240 =============== | 240 =============== |
241 | 241 |
242 In addition to the repertoire of run-from-IRAM (loadable via fc-iram) programs | |
243 that form the main course of target-utils, we have a flashable program called | |
244 flash-boot-test - it will be called FBT for short in this article. FBT is a | |
245 test case for the "main application" in flash, and it can be flashed in the | |
246 place of a regular firmware image for certain very low-level tests. Because it | |
247 runs via the flash boot path and does not get loaded serially, FBT is quite | |
248 hardware-specific by necessity: it assumes a platform with 26 MHz Calypso clock | |
249 input and always uses the IrDA UART for communication (hard-coded). FBT was | |
250 written with FCDEV3B and Openmoko GTA02 boards in mind; it won't work on a | |
251 D-Sample board because of the 13 MHz vs. 26 MHz clock difference. | |
252 | |
253 FBT is built in two versions: fbt-mode0.bin and fbt-mode1.bin, differing in the | |
254 magic words at location 0x2000 which tell the Calypso boot ROM how the main | |
255 application in flash should be booted - please refer to the Flash-boot-modes | |
256 article in the freecalypso-docs repository. Only the magic words differ between | |
257 fbt-mode0.bin and fbt-mode1.bin versions; the main body of the code is exactly | |
258 the same. Once it receives control from the boot ROM in whichever mode it was | |
259 booted in, FBT's own code in main.c does the absolute minimum initialization to | |
260 allow serial communication (sets the VCLKOUT_DIV2 bit in the FFFF:FD02 register | |
261 and initializes the IrDA UART) and falls into the same interactive mode of | |
262 operation (listening for text-based commands) as our various run-from-IRAM | |
263 programs, allowing the operator to explore system state as closely out of boot | |
264 as possible. | |
265 | |
266 When a main application in flash is booted in mode 1 (with the boot ROM moved | |
267 out of the way), the Calypso watchdog timer is running, and our FBT program | |
268 does not a perform a watchdog disable step on its own. Therefore, if you flash | |
269 fbt-mode1.bin and boot it, you will see it keep endlessly rebooting about every | |
270 9 s. To stop this endless reboot cycle, issue a wd (watchdog disable) command: | |
271 it is short enough to be easily typed in the available 9 s window. The same | |
272 issue does not occur in flash boot mode 0, as the Calypso boot ROM does disable | |
273 the watchdog and leaves it disabled when booting mode 0 flash images or serially | |
274 downloaded code. | |
275 | |
276 FBT also has a few other commands that have been added to facilitate further | |
277 experimentation with the watchdog timer feature of the Calypso chip - please | |
278 refer to the source code. |