|
15 | 15 | #include "boot/picoboot.h"
|
16 | 16 | #include "boot/uf2.h"
|
17 | 17 |
|
18 |
| -#include "bootrom_structs.h" |
19 |
| - |
20 | 18 | #include "lwip/pbuf.h"
|
21 | 19 | #include "lwip/tcp.h"
|
22 | 20 |
|
@@ -322,17 +320,14 @@ int main() {
|
322 | 320 |
|
323 | 321 | if (rom_get_last_boot_type() == BOOT_TYPE_FLASH_UPDATE) {
|
324 | 322 | printf("Someone updated into me\n");
|
325 |
| - printf("Params were %x %x\n", boot_info.reboot_params[0], boot_info.reboot_params[1]); |
326 |
| - printf("Update info %x\n", boot_info.tbyb_and_update_info); |
327 |
| - printf("TBYB flash address is %x\n", always->zero_init.tbyb_flag_flash_addr); |
328 |
| - printf("TBYB erase address is %x\n", always->zero_init.version_downgrade_erase_flash_addr); |
329 |
| - printf("Workarea at %x\n", workarea); |
| 323 | + if (boot_info.reboot_params[0]) printf("Flash update base was %x\n", boot_info.reboot_params[0]); |
| 324 | + if (boot_info.tbyb_and_update_info) printf("Update info %x\n", boot_info.tbyb_and_update_info); |
| 325 | + if (always->zero_init.tbyb_flag_flash_addr) printf("TBYB flash address is %x\n", always->zero_init.tbyb_flag_flash_addr); |
| 326 | + if (always->zero_init.version_downgrade_erase_flash_addr) printf("TBYB erase address is %x\n", always->zero_init.version_downgrade_erase_flash_addr); |
330 | 327 | ret = rom_explicit_buy(workarea, sizeof(workarea));
|
331 |
| - printf("Buy returned %d\n", ret); |
| 328 | + if (ret) printf("Buy returned %d\n", ret); |
332 | 329 | ret = rom_get_boot_info(&boot_info);
|
333 |
| - printf("Update info now %x\n", boot_info.tbyb_and_update_info); |
334 |
| - printf("TBYB flash address is %x\n", always->zero_init.tbyb_flag_flash_addr); |
335 |
| - printf("TBYB erase address is %x\n", always->zero_init.version_downgrade_erase_flash_addr); |
| 330 | + if (boot_info.tbyb_and_update_info) printf("Update info now %x\n", boot_info.tbyb_and_update_info); |
336 | 331 | }
|
337 | 332 |
|
338 | 333 |
|
|
0 commit comments