diff --git a/apps/boot_stub/src/boot.c b/apps/boot_stub/src/boot.c index 0ba4899b8..eb51ffb02 100644 --- a/apps/boot_stub/src/boot.c +++ b/apps/boot_stub/src/boot.c @@ -42,6 +42,8 @@ /// Contains addresses of flash sections. Defined in bin/targets/nrf52_boot/generated/src/nrf52_boot-sysflash.c extern const struct flash_area sysflash_map_dflt[]; +static void relocate_vector_table(void *vector_table, void *relocated_vector_table); + /// This is a Stub Bootloader. We jump straight into the application without doing any processing. /// This simple bootloader allows the application to take up more ROM space. /// And it allows debugging of application firmware that doesn't have a valid MCUBoot Image Header. @@ -52,16 +54,22 @@ int main(void) { // Previously: flash_map_init(); // Previously: rc = boot_go(&rsp); - // img_start points to the nRF52 Vector Table for the app... + // vector_table points to the Arm Vector Table for the appplication... // First word contains initial MSP value (estack = end of RAM) - // Second word contains address of entry point (Reset_Handler = 0x0800112d) - void *img_start = (void *) ( - sysflash_map_dflt[1].fa_off // Offset of FLASH_AREA_IMAGE_0 (application image): 0x00008000 - + 0x20 // Size of Mynewt image header - ); // Equals 0x00008020 (__isr_vector) + // Second word contains address of entry point (Reset_Handler) + void *vector_table = (void *) ( + sysflash_map_dflt[1].fa_off // Offset of FLASH_AREA_IMAGE_0 (application image): 0x8000 + + 0x20 // Size of MCUBoot image header + ); // Equals 0x8020 (__isr_vector) + + // Relocate the application vector table to a 0x100 page boundary in ROM. + relocate_vector_table( // Relocate the vector table... + vector_table, // From the non-aligned application address (0x8020) + (void *) RELOCATED_VECTOR_TABLE // To the relocated address aligned to 0x100 page boundary + ); - // Jump to Reset_Handler of the application. Uses first word and second word of img_start. - hal_system_start(img_start); + // Jump to Reset_Handler of the application. Uses first word and second word of vector table at img_start. + hal_system_start(vector_table); // Should never come here. return 0; @@ -69,11 +77,10 @@ int main(void) { /// Relocate the Arm Vector Table from vector_table to relocated_vector_table. /// vector_table must be aligned to 0x100 page boundary. -void relocate_vector_table(void *vector_table, void *relocated_vector_table) { +static void relocate_vector_table(void *vector_table, void *relocated_vector_table) { uint32_t *current_location = (uint32_t *) vector_table; uint32_t *new_location = (uint32_t *) relocated_vector_table; if (new_location == current_location) { return; } // No need to relocate - // Check whether we need to copy the vectors. int vector_diff = 0; // Non-zero if a vector is different for (int i = 0; i < NVIC_NUM_VECTORS; i++) { @@ -82,7 +89,6 @@ void relocate_vector_table(void *vector_table, void *relocated_vector_table) { break; } } - // If we need to copy the vectors, erase the flash ROM and write the vectors. if (vector_diff) { hal_flash_erase( // Erase... @@ -97,7 +103,6 @@ void relocate_vector_table(void *vector_table, void *relocated_vector_table) { 0x100 // Assume that we copy an entire page ); } - // Point VTOR Register in the System Control Block to the relocated vector table. *SCB_VTOR = (uint32_t) relocated_vector_table; } \ No newline at end of file diff --git a/libs/pinetime_boot/src/pinetime_boot.c b/libs/pinetime_boot/src/pinetime_boot.c index 123d1e779..f2ea927cd 100644 --- a/libs/pinetime_boot/src/pinetime_boot.c +++ b/libs/pinetime_boot/src/pinetime_boot.c @@ -22,13 +22,25 @@ #include #include #include +#include #include #include "bootutil/image.h" #include #include "pinetime_boot/pinetime_boot.h" -#define PUSH_BUTTON_IN 13 // P0.13: PUSH BUTTON_IN -#define PUSH_BUTTON_OUT 15 // P0.15/TRACEDATA2: PUSH BUTTON_OUT +#define PUSH_BUTTON_IN 13 // GPIO Pin P0.13: PUSH BUTTON_IN +#define PUSH_BUTTON_OUT 15 // GPIO Pin P0.15/TRACEDATA2: PUSH BUTTON_OUT + +/// Vector Table will be relocated here. +#define RELOCATED_VECTOR_TABLE 0x7F00 + +/// Number of entries in the Vector Table. +#define NVIC_NUM_VECTORS (16 + 38) + +/// Address of the VTOR Register in the System Control Block. +#define SCB_VTOR ((uint32_t *) 0xE000ED08) + +static void relocate_vector_table(void *vector_table, void *relocated_vector_table); /// Init the display and render the boot graphic. Called by sysinit() during startup, defined in pkg.yml. void pinetime_boot_init(void) { @@ -42,7 +54,7 @@ void pinetime_boot_init(void) { // Display the image. pinetime_boot_display_image(); - console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); + console_printf("Check button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); } /// Called by MCUBoot when it has completed its work. @@ -51,21 +63,33 @@ void boot_custom_start( struct boot_rsp *rsp ) { // Wait 5 seconds for button press. - console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); + console_printf("Waiting 5 seconds for button: %d...\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); for (int i = 0; i < 15; i++) { pinetime_boot_check_button(); } - console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); + console_printf("Waited for button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); // TODO: If button is pressed and held for 5 seconds, rollback the firmware. console_printf("Bootloader done\n"); console_flush(); - // Start the Active Firmware Image. Copied from MCUBoot main(). - hal_system_start((void *)( - flash_base + - rsp->br_image_off + - rsp->br_hdr->ih_hdr_size - )); + // vector_table points to the Arm Vector Table for the appplication... + // First word contains initial MSP value (estack = end of RAM) + // Second word contains address of entry point (Reset_Handler) + void *vector_table = (void *) ( // Copied from MCUBoot main() + flash_base + // 0 + rsp->br_image_off + // Offset of FLASH_AREA_IMAGE_0 (application image): 0x8000 + rsp->br_hdr->ih_hdr_size // Size of MCUBoot image header (0x20) + ); // Equals 0x8020 (__isr_vector) + // console_printf("vector_table=%lx, flash_base=%lx, image_off=%lx, hdr_size=%lx\n", (uint32_t) vector_table, (uint32_t) flash_base, (uint32_t) rsp->br_image_off, (uint32_t) rsp->br_hdr->ih_hdr_size); console_flush(); + + // Relocate the application vector table to a 0x100 page boundary in ROM. + relocate_vector_table( // Relocate the vector table... + vector_table, // From the non-aligned application address (0x8020) + (void *) RELOCATED_VECTOR_TABLE // To the relocated address aligned to 0x100 page boundary + ); + + // Start the Active Firmware Image at the Reset_Handler function. + hal_system_start(vector_table); } /// Check whether the watch button is pressed @@ -75,6 +99,38 @@ void pinetime_boot_check_button(void) { } } +/// Relocate the Arm Vector Table from vector_table to relocated_vector_table. +/// vector_table must be aligned to 0x100 page boundary. +static void relocate_vector_table(void *vector_table, void *relocated_vector_table) { + uint32_t *current_location = (uint32_t *) vector_table; + uint32_t *new_location = (uint32_t *) relocated_vector_table; + if (new_location == current_location) { return; } // No need to relocate + // Check whether we need to copy the vectors. + int vector_diff = 0; // Non-zero if a vector is different + for (int i = 0; i < NVIC_NUM_VECTORS; i++) { + if (new_location[i] != current_location[i]) { + vector_diff = 1; + break; + } + } + // If we need to copy the vectors, erase the flash ROM and write the vectors. + if (vector_diff) { + hal_flash_erase( // Erase... + 0, // Internal Flash ROM + (uint32_t) relocated_vector_table, // At the relocated address + 0x100 // Assume that we erase an entire page + ); + hal_flash_write( // Write... + 0, // Internal Flash ROM + (uint32_t) relocated_vector_table, // To the relocated address + vector_table, // From the original address + 0x100 // Assume that we copy an entire page + ); + } + // Point VTOR Register in the System Control Block to the relocated vector table. + *SCB_VTOR = (uint32_t) relocated_vector_table; +} + /* Log: Starting Bootloader... Displaying image... diff --git a/logs/mynewt.elf.lst b/logs/mynewt.elf.lst index 88bba197f..ea0fc8e9b 100644 --- a/logs/mynewt.elf.lst +++ b/logs/mynewt.elf.lst @@ -6,11 +6,11 @@ EXEC_P, HAS_SYMS, D_PAGED start address 0x000000d9 Program Header: -0x70000001 off 0x00015844 vaddr 0x00005844 paddr 0x00005844 align 2**2 +0x70000001 off 0x000158ec vaddr 0x000058ec paddr 0x000058ec align 2**2 filesz 0x00000018 memsz 0x00000018 flags r-- LOAD off 0x00010000 vaddr 0x00000000 paddr 0x00000000 align 2**16 - filesz 0x0000585c memsz 0x0000585c flags r-x - LOAD off 0x000200d8 vaddr 0x200000d8 paddr 0x0000585c align 2**16 + filesz 0x00005904 memsz 0x00005904 flags r-x + LOAD off 0x000200d8 vaddr 0x200000d8 paddr 0x00005904 align 2**16 filesz 0x00000084 memsz 0x0000634c flags rw- LOAD off 0x00030000 vaddr 0x20000000 paddr 0x20000000 align 2**16 filesz 0x00000000 memsz 0x000000d8 flags rw- @@ -18,30 +18,30 @@ private flags = 5000200: [Version5 EABI] [soft-float ABI] Sections: Idx Name Size VMA LMA File off Algn Flags - 0 .text 00005844 00000000 00000000 00010000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .ARM.extab 00000000 00005844 00005844 0002015c 2**0 CONTENTS - 2 .ARM.exidx 00000018 00005844 00005844 00015844 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA + 0 .text 000058ec 00000000 00000000 00010000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .ARM.extab 00000000 000058ec 000058ec 0002015c 2**0 CONTENTS + 2 .ARM.exidx 00000018 000058ec 000058ec 000158ec 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .vector_relocation 000000d8 20000000 20000000 00030000 2**0 ALLOC 4 .rtt 00000000 200000d8 200000d8 0002015c 2**0 CONTENTS - 5 .data 00000084 200000d8 0000585c 000200d8 2**2 CONTENTS, ALLOC, LOAD, DATA + 5 .data 00000084 200000d8 00005904 000200d8 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .bssnz 00000000 2000015c 2000015c 0002015c 2**0 CONTENTS - 7 .bss 000062c8 2000015c 000058e0 0002015c 2**2 ALLOC + 7 .bss 000062c8 2000015c 00005988 0002015c 2**2 ALLOC 8 .stack_dummy 000001b0 20006428 20006428 00020160 2**3 CONTENTS, READONLY 9 .ARM.attributes 0000002f 00000000 00000000 00020310 2**0 CONTENTS, READONLY 10 .comment 0000007f 00000000 00000000 0002033f 2**0 CONTENTS, READONLY 11 .svc_table 00000004 00000000 00000000 000203be 2**0 CONTENTS, READONLY - 12 .debug_line 00011840 00000000 00000000 000203c2 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_info 0002a0a0 00000000 00000000 00031c02 2**0 CONTENTS, READONLY, DEBUGGING - 14 .debug_abbrev 00007631 00000000 00000000 0005bca2 2**0 CONTENTS, READONLY, DEBUGGING - 15 .debug_aranges 00001508 00000000 00000000 000632d8 2**3 CONTENTS, READONLY, DEBUGGING - 16 .debug_str 0000621d 00000000 00000000 000647e0 2**0 CONTENTS, READONLY, DEBUGGING - 17 .debug_loc 0000f72e 00000000 00000000 0006a9fd 2**0 CONTENTS, READONLY, DEBUGGING - 18 .debug_ranges 000012a8 00000000 00000000 0007a12b 2**0 CONTENTS, READONLY, DEBUGGING - 19 .debug_frame 00003660 00000000 00000000 0007b3d4 2**2 CONTENTS, READONLY, DEBUGGING + 12 .debug_line 0001187c 00000000 00000000 000203c2 2**0 CONTENTS, READONLY, DEBUGGING + 13 .debug_info 0002a19f 00000000 00000000 00031c3e 2**0 CONTENTS, READONLY, DEBUGGING + 14 .debug_abbrev 00007670 00000000 00000000 0005bddd 2**0 CONTENTS, READONLY, DEBUGGING + 15 .debug_aranges 00001510 00000000 00000000 00063450 2**3 CONTENTS, READONLY, DEBUGGING + 16 .debug_str 00006256 00000000 00000000 00064960 2**0 CONTENTS, READONLY, DEBUGGING + 17 .debug_loc 0000f7e8 00000000 00000000 0006abb6 2**0 CONTENTS, READONLY, DEBUGGING + 18 .debug_ranges 000012c8 00000000 00000000 0007a39e 2**0 CONTENTS, READONLY, DEBUGGING + 19 .debug_frame 00003684 00000000 00000000 0007b668 2**2 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 00000000 l d .text 00000000 .text -00005844 l d .ARM.extab 00000000 .ARM.extab -00005844 l d .ARM.exidx 00000000 .ARM.exidx +000058ec l d .ARM.extab 00000000 .ARM.extab +000058ec l d .ARM.exidx 00000000 .ARM.exidx 20000000 l d .vector_relocation 00000000 .vector_relocation 200000d8 l d .rtt 00000000 .rtt 200000d8 l d .data 00000000 .data @@ -80,7 +80,7 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 start.c 00000000 l df *ABS* 00000000 main.c 00000000 l df *ABS* 00000000 hal_bsp.c -000050cc l O .text 00000008 flash_devs +0000512c l O .text 00000008 flash_devs 00000000 l df *ABS* 00000000 cmsis_nvic.c 00000000 l df *ABS* 00000000 spiflash.c 000006ac l F .text 00000014 hal_spiflash_sector_info @@ -94,9 +94,9 @@ SYMBOL TABLE: 000009fa l F .text 00000008 hal_spiflash_erase_sector 00000acc l F .text 00000008 hal_spiflash_erase 00000b38 l F .text 0000003e hal_spiflash_init -00005104 l O .text 0000001c spiflash_flash_funcs +00005164 l O .text 0000001c spiflash_flash_funcs 20000128 l O .data 00000010 supported_chips -000050d4 l O .text 00000030 spiflash_characteristics +00005134 l O .text 00000030 spiflash_characteristics 00000000 l df *ABS* 00000000 hal_common.c 00000000 l df *ABS* 00000000 hal_flash.c 00000b7c l F .text 00000028 nrf52k_flash_wait_ready @@ -105,7 +105,7 @@ SYMBOL TABLE: 00000bfc l F .text 00000020 nrf52k_flash_sector_info 00000c1c l F .text 000000d0 nrf52k_flash_write 00000cec l F .text 0000000e nrf52k_flash_read -00005138 l O .text 0000001c nrf52k_flash_funcs +00005198 l O .text 0000001c nrf52k_flash_funcs 00000000 l df *ABS* 00000000 hal_gpio.c 00000000 l df *ABS* 00000000 hal_spi.c 00000db4 l F .text 0000006e nrf52_irqm_handler @@ -113,14 +113,14 @@ SYMBOL TABLE: 00000e50 l F .text 0000004a hal_spi_config_slave 00000e9c l F .text 000000b8 hal_spi_init_master 00000f54 l F .text 000000de hal_spi_config_master -00005154 l O .text 0000000c nrf52_hal_spis +000051b4 l O .text 0000000c nrf52_hal_spis 00000000 l df *ABS* 00000000 hal_watchdog.c 000012a0 l F .text 0000000e nrf52_hal_wdt_default_handler 000012b0 l F .text 00000020 nrf52_wdt_irq_handler 00000000 l df *ABS* 00000000 nrf52_periph.c 00001348 l F .text 00000034 nrf52_periph_create_timers 0000137c l F .text 00000020 nrf52_periph_create_spi -00005160 l O .text 00000004 os_bsp_spi0m_cfg +000051c0 l O .text 00000004 os_bsp_spi0m_cfg 00000000 l df *ABS* 00000000 hal_timer.c 000013a8 l F .text 0000000a nrf_read_timer_cntr 000013b4 l F .text 000000b4 nrf_timer_set_ocmp @@ -129,7 +129,7 @@ SYMBOL TABLE: 0000147c l F .text 00000054 hal_timer_read_bsptimer 000014d0 l F .text 00000076 hal_timer_chk_queue 00001546 l F .text 0000002c hal_timer_irq_handler -00005164 l O .text 00000018 nrf52_hal_timers +000051c4 l O .text 00000018 nrf52_hal_timers 00000000 l df *ABS* 00000000 os_fault.c 00000000 l df *ABS* 00000000 os_cputime.c 00000000 l df *ABS* 00000000 os_dev.c @@ -168,60 +168,61 @@ SYMBOL TABLE: 00001dca l .text 00000000 loop2 00000000 l df *ABS* 00000000 memset.c 00000000 l df *ABS* 00000000 pinetime_boot.c +00001e0c l F .text 00000050 relocate_vector_table 00000000 l df *ABS* 00000000 display.c -00001ec4 l F .text 0000001e hard_reset -00001ee2 l F .text 00000008 delay_ms -00001eea l F .text 0000003a transmit_spi -00001f24 l F .text 0000001a write_data -00001f3e l F .text 0000004e write_command -00001f8c l F .text 0000014c init_display -000020d8 l F .text 00000028 set_orientation -00002100 l F .text 000000d0 set_window +00001f24 l F .text 0000001e hard_reset +00001f42 l F .text 00000008 delay_ms +00001f4a l F .text 0000003a transmit_spi +00001f84 l F .text 0000001a write_data +00001f9e l F .text 0000004e write_command +00001fec l F .text 0000014c init_display +00002138 l F .text 00000028 set_orientation +00002160 l F .text 000000d0 set_window 20004a90 l O .bss 00000100 flash_buffer -0000532c l O .text 00000001 COLMOD_PARA.7864 -00005330 l O .text 00000003 FRMCTR1_PARA.7852 -00005334 l O .text 00000003 FRMCTR2_PARA.7853 -00005338 l O .text 00000006 FRMCTR3_PARA.7854 -00005340 l O .text 00000001 INVCTR_PARA.7855 -00005344 l O .text 00000001 MADCTL1_PARA.7862 -00005348 l O .text 00000003 PWCTR1_PARA.7856 -0000534c l O .text 00000001 PWCTR2_PARA.7857 -00005350 l O .text 00000002 PWCTR3_PARA.7858 -00005354 l O .text 00000002 PWCTR4_PARA.7859 -00005358 l O .text 00000002 PWCTR5_PARA.7860 -0000535c l O .text 00000001 VMCTR1_PARA.7861 +000053d4 l O .text 00000001 COLMOD_PARA.7864 +000053d8 l O .text 00000003 FRMCTR1_PARA.7852 +000053dc l O .text 00000003 FRMCTR2_PARA.7853 +000053e0 l O .text 00000006 FRMCTR3_PARA.7854 +000053e8 l O .text 00000001 INVCTR_PARA.7855 +000053ec l O .text 00000001 MADCTL1_PARA.7862 +000053f0 l O .text 00000003 PWCTR1_PARA.7856 +000053f4 l O .text 00000001 PWCTR2_PARA.7857 +000053f8 l O .text 00000002 PWCTR3_PARA.7858 +000053fc l O .text 00000002 PWCTR4_PARA.7859 +00005400 l O .text 00000002 PWCTR5_PARA.7860 +00005404 l O .text 00000001 VMCTR1_PARA.7861 00000000 l df *ABS* 00000000 console.c 20004b90 l O .bss 00000010 avail_queue 20004ba0 l O .bss 0000000c console_write_lock 00000000 l df *ABS* 00000000 console_fmt.c 00000000 l df *ABS* 00000000 semihosting_console.c -0000235c l F .text 00000024 __semihost -00002380 l F .text 00000010 debugger_connected -00002390 l F .text 0000002e semihost_write -00002464 l F .text 0000001c semihosting_console_write_ch +000023bc l F .text 00000024 __semihost +000023e0 l F .text 00000010 debugger_connected +000023f0 l F .text 0000002e semihost_write +000024c4 l F .text 0000001c semihosting_console_write_ch 20004bac l O .bss 00000004 semihost_mbuf 20000148 l O .data 00000001 log_enabled 00000000 l df *ABS* 00000000 ticks.c 20004bb0 l O .bss 00000001 do_ticks 00000000 l df *ABS* 00000000 sysinit.c -000024cc l F .text 00000006 sysinit_dflt_panic_cb +0000252c l F .text 00000006 sysinit_dflt_panic_cb 00000000 l df *ABS* 00000000 mem.c 00000000 l df *ABS* 00000000 nrf52_boot-sysinit-app.c 00000000 l df *ABS* 00000000 loader.c -00002538 l F .text 00000040 boot_is_header_valid -00002578 l F .text 0000001c boot_write_sz -00002594 l F .text 0000009c boot_read_image_size -00002630 l F .text 00000054 boot_check_header_erased -00002684 l F .text 00000048 boot_initialize_area -000026cc l F .text 0000003a boot_read_sectors -00002708 l F .text 00000034 boot_image_check -0000273c l F .text 00000098 boot_validate_slot -000027d4 l F .text 00000038 boot_validated_swap_type -0000280c l F .text 00000036 boot_read_image_headers -00002878 l F .text 0000009c boot_swap_image -00002914 l F .text 00000084 boot_complete_partial_swap -00002998 l F .text 00000058 boot_perform_update -000029f0 l F .text 000000e4 boot_prepare_image_for_update +00002598 l F .text 00000040 boot_is_header_valid +000025d8 l F .text 0000001c boot_write_sz +000025f4 l F .text 0000009c boot_read_image_size +00002690 l F .text 00000054 boot_check_header_erased +000026e4 l F .text 00000048 boot_initialize_area +0000272c l F .text 0000003a boot_read_sectors +00002768 l F .text 00000034 boot_image_check +0000279c l F .text 00000098 boot_validate_slot +00002834 l F .text 00000038 boot_validated_swap_type +0000286c l F .text 00000036 boot_read_image_headers +000028d8 l F .text 0000009c boot_swap_image +00002974 l F .text 00000084 boot_complete_partial_swap +000029f8 l F .text 00000058 boot_perform_update +00002a50 l F .text 000000e4 boot_prepare_image_for_update 20004bb4 l O .bss 0000006c boot_data 20004c20 l O .bss 00000400 buf.4971 20005020 l O .bss 00000600 primary_slot_sectors.5011 @@ -230,53 +231,53 @@ SYMBOL TABLE: 20006220 l O .bss 00000100 tmpbuf.4904 00000000 l df *ABS* 00000000 swap_misc.c 00000000 l df *ABS* 00000000 swap_scratch.c -00002ece l F .text 0000002e boot_copy_sz -00002efc l F .text 00000332 boot_swap_sectors -00005580 l O .text 00000010 boot_status_tables +00002f2e l F .text 0000002e boot_copy_sz +00002f5c l F .text 00000332 boot_swap_sectors +00005628 l O .text 00000010 boot_status_tables 00000000 l df *ABS* 00000000 bootutil_misc.c -000035f6 l F .text 0000000c boot_flag_decode -00003604 l F .text 00000018 boot_magic_decode -0000361c l F .text 00000060 boot_find_status -0000367c l F .text 0000006a boot_write_trailer -000036e6 l F .text 00000016 boot_write_trailer_flag -0000569c l O .text 00000012 boot_swap_tables +00003656 l F .text 0000000c boot_flag_decode +00003664 l F .text 00000018 boot_magic_decode +0000367c l F .text 00000060 boot_find_status +000036dc l F .text 0000006a boot_write_trailer +00003746 l F .text 00000016 boot_write_trailer_flag +00005744 l O .text 00000012 boot_swap_tables 00000000 l df *ABS* 00000000 image_validate.c -00003a00 l F .text 0000007e bootutil_img_hash +00003a60 l F .text 0000007e bootutil_img_hash 00000000 l df *ABS* 00000000 tlv.c 00000000 l df *ABS* 00000000 flash_map_extended.c 00000000 l df *ABS* 00000000 sha256.c -000056f8 l O .text 00000100 K +000057a0 l O .text 00000100 K 00000000 l df *ABS* 00000000 hal_flash.c -00004068 l F .text 0000001e hal_flash_check_addr +000040c8 l F .text 0000001e hal_flash_check_addr 20006320 l O .bss 00000001 protected_flash 00000000 l df *ABS* 00000000 hal_system_start.c 00000000 l df *ABS* 00000000 inline.c 00000000 l df *ABS* 00000000 mynewt.c -00004358 l F .text 00000004 stdin_read -0000435c l F .text 00000010 stdout_write +000043b8 l F .text 00000004 stdin_read +000043bc l F .text 00000010 stdout_write 20000150 l O .data 00000004 _stdin 20000154 l O .data 00000008 _stdin_methods 00000000 l df *ABS* 00000000 strlen.c 00000000 l df *ABS* 00000000 tinyprintf.c -0000437c l F .text 000000c0 ui2a -0000443c l F .text 00000020 i2a -0000445c l F .text 00000030 a2d -0000448c l F .text 00000036 a2i -000044c2 l F .text 0000002a putf -000044ec l F .text 0000011c putchw -00004608 l F .text 00000064 intarg +000043dc l F .text 000000c0 ui2a +0000449c l F .text 00000020 i2a +000044bc l F .text 00000030 a2d +000044ec l F .text 00000036 a2i +00004522 l F .text 0000002a putf +0000454c l F .text 0000011c putchw +00004668 l F .text 00000064 intarg 00000000 l df *ABS* 00000000 vprintf.c 00000000 l df *ABS* 00000000 flash_map.c -00004908 l F .text 00000078 flash_map_read_mfg +00004968 l F .text 00000078 flash_map_read_mfg 20006324 l O .bss 00000078 mfg_areas.7780 00000000 l df *ABS* 00000000 modlog.c 00000000 l df *ABS* 00000000 mfg.c -00004b30 l F .text 00000094 mfg_seek_next_aux -00004bc4 l F .text 00000070 mfg_read_mmr -00004c34 l F .text 00000054 mfg_read_next_mmr -00004c88 l F .text 0000003c mfg_open_flash_area -00004cc4 l F .text 00000044 mfg_read_tlv_body -00004d7c l F .text 0000004e mfg_read_mmr_refs +00004b90 l F .text 00000094 mfg_seek_next_aux +00004c24 l F .text 00000070 mfg_read_mmr +00004c94 l F .text 00000054 mfg_read_next_mmr +00004ce8 l F .text 0000003c mfg_open_flash_area +00004d24 l F .text 00000044 mfg_read_tlv_body +00004ddc l F .text 0000004e mfg_read_mmr_refs 2000639c l O .bss 00000001 mfg_initialized 200063a0 l O .bss 00000018 mfg_mmrs 200063b8 l O .bss 00000004 mfg_num_mmrs @@ -287,29 +288,29 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 os_sched.c 00000000 l df *ABS* 00000000 SVC_Table.S 00000000 l .svc_table 00000000 SVC_End -00002410 g F .text 00000054 console_buffer +00002470 g F .text 00000054 console_buffer 20006428 g .bss 00000000 __HeapBase 00000000 g .svc_table 00000000 SVC_Count 00000144 w F .text 00000002 TIMER2_IRQHandler 20006400 g O .bss 00000008 g_os_mempool_list 00000144 w F .text 00000002 RTC0_IRQHandler -00003774 g F .text 000000c0 boot_read_swap_state -00002cdc g F .text 00000010 boot_go +000037d4 g F .text 000000c0 boot_read_swap_state +00002d3c g F .text 00000010 boot_go 200000d8 g .data 00000000 __data_start__ -00005120 g O .text 00000018 nrf52k_flash_dev -000048d0 g F .text 00000024 printf -000057f8 g O .text 00000004 stdout +00005180 g O .text 00000018 nrf52k_flash_dev +00004930 g F .text 00000024 printf +000058a0 g O .text 00000004 stdout 00000144 w F .text 00000002 SWI0_EGU0_IRQHandler 00000d5e g F .text 00000022 hal_gpio_write -00003d7c g F .text 00000128 mbedtls_internal_sha256_process +00003ddc g F .text 00000128 mbedtls_internal_sha256_process 00000136 w F .text 00000002 HardFault_Handler 00001584 g F .text 00000060 hal_timer_init -00004d1a g F .text 0000001a mfg_seek_next_with_type -000042fa g F .text 0000000a hal_system_start -000038c0 g F .text 00000044 boot_write_swap_info -000040ae g F .text 00000010 hal_flash_align +00004d7a g F .text 0000001a mfg_seek_next_with_type +0000435a g F .text 0000000a hal_system_start +00003920 g F .text 00000044 boot_write_swap_info +0000410e g F .text 00000010 hal_flash_align 00000144 w F .text 00000002 SWI2_EGU2_IRQHandler -000036fc g F .text 00000020 boot_magic_compatible_check +0000375c g F .text 00000020 boot_magic_compatible_check 00001bba g F .text 0000000c SysTick_Handler 00000144 w F .text 00000002 GPIOTE_IRQHandler 00001574 g F .text 00000010 nrf52_timer0_irq_handler @@ -317,114 +318,114 @@ SYMBOL TABLE: 00000144 w F .text 00000002 PWM1_IRQHandler 00001ab8 g F .text 00000028 os_msys_get_pkthdr 2000641c g O .bss 00000004 flash_map -00004268 g F .text 00000030 hal_flash_is_erased +000042c8 g F .text 00000030 hal_flash_is_erased 00001b90 g F .text 0000002a PendSV_Handler 00000134 w F .text 00000002 NMI_Handler -0000585c g .ARM.exidx 00000000 __exidx_end -00003ccc g F .text 0000000c mbedtls_sha256_init +00005904 g .ARM.exidx 00000000 __exidx_end +00003d2c g F .text 0000000c mbedtls_sha256_init 00000000 g .text 00000000 __isr_vector_start 00000174 g F .text 0000002c hal_system_reset 20000148 g .data 00000000 __aeabi_unwind_cpp_pr0 00000144 w F .text 00000002 POWER_CLOCK_IRQHandler -0000585c g .ARM.exidx 00000000 __etext +00005904 g .ARM.exidx 00000000 __etext 00000144 w F .text 00000002 RADIO_IRQHandler -00004a62 g F .text 00000026 flash_area_write +00004ac2 g F .text 00000026 flash_area_write 2000015c g .bssnz 00000000 __bssnz_start__ 00000a3e g F .text 0000008e spiflash_erase 00000144 w F .text 00000002 PDM_IRQHandler -00002cec g F .text 00000084 swap_erase_trailer_sectors -00002b9c g F .text 00000140 context_boot_go -0000333c g F .text 00000100 boot_slots_compatible -00004d34 g F .text 0000000a mfg_read_tlv_flash_area -000024c0 g F .text 0000000c console_get_ticks +00002d4c g F .text 00000084 swap_erase_trailer_sectors +00002bfc g F .text 00000140 context_boot_go +0000339c g F .text 00000100 boot_slots_compatible +00004d94 g F .text 0000000a mfg_read_tlv_flash_area +00002520 g F .text 0000000c console_get_ticks 000019cc g F .text 00000010 os_mempool_module_init 00000144 w F .text 00000002 TEMP_IRQHandler 00000144 w F .text 00000002 QDEC_IRQHandler 00000144 w F .text 00000002 TIMER3_IRQHandler 00001878 g F .text 0000000a timer_handler -00003578 g F .text 0000007e swap_run -000024bc g F .text 00000004 semihosting_console_init +000035d8 g F .text 0000007e swap_run +0000251c g F .text 00000004 semihosting_console_init 00001dba g F .text 0000001a memcpy 000012d0 g F .text 00000078 hal_watchdog_init 000017f0 g F .text 0000000c os_cputime_init -00002e94 g F .text 0000003a swap_set_image_ok -00004dcc g F .text 00000000 .hidden __aeabi_uldivmod -00004298 g F .text 00000062 hal_flash_isempty -00004324 g F .text 00000034 puts +00002ef4 g F .text 0000003a swap_set_image_ok +00004e2c g F .text 00000000 .hidden __aeabi_uldivmod +000042f8 g F .text 00000062 hal_flash_isempty +00004384 g F .text 00000034 puts 00000000 g *ABS* 00000000 _imghdr_size 20006414 g O .bss 00000004 console_is_midline 00001c6a g F .text 00000014 os_mbuf_free 200000e4 g O .data 00000004 SystemCoreClock 00000158 g F .text 0000000c hal_system_init 00000144 w F .text 00000002 SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler -00004a3c g F .text 00000026 flash_area_read +00004a9c g F .text 00000026 flash_area_read 0000170c g F .text 0000004c __assert_func 00000e24 g F .text 00000018 nrf52_spi0_irq_handler -000022dc g F .text 00000038 console_pkg_init +0000233c g F .text 00000038 console_pkg_init 0000013c w F .text 00000002 UsageFault_Handler 00000a22 g F .text 0000001c spiflash_chip_erase 00000144 w F .text 00000002 UARTE0_UART0_IRQHandler -0000466c g F .text 0000025c tfp_format +000046cc g F .text 0000025c tfp_format 2000fe50 g *ABS* 00000000 __HeapLimit 2000015c g .bss 00000000 __bss_start__ 00000164 g F .text 00000010 hal_debugger_connected -00004124 g F .text 00000074 hal_flash_write +00004184 g F .text 00000074 hal_flash_write 00000144 w F .text 00000002 TIMER4_IRQHandler -00004dfc g F .text 000002cc .hidden __udivmoddi4 -0000372e g F .text 0000001e boot_status_entries -0000371c g F .text 00000008 boot_status_sz +00004e5c g F .text 000002cc .hidden __udivmoddi4 +0000378e g F .text 0000001e boot_status_entries +0000377c g F .text 00000008 boot_status_sz 20006408 g O .bss 00000004 g_current_task 00001882 g F .text 0000000c os_arch_save_sr -0000322e g F .text 00000034 boot_read_image_header -00003884 g F .text 00000020 boot_write_magic +0000328e g F .text 00000034 boot_read_image_header +000038e4 g F .text 00000020 boot_write_magic 00001940 g F .text 00000014 os_mempool_init 00000ad4 g F .text 00000064 spiflash_identify 00001806 g F .text 00000016 os_cputime_delay_ticks 20006418 g O .bss 00000001 g_console_input_ignore -00005844 g .text 00000000 __exidx_start -00002b3c g F .text 00000008 boot_erase_region -0000343c g F .text 0000013c swap_status_source +000058ec g .text 00000000 __exidx_start +00002b9c g F .text 00000008 boot_erase_region +0000349c g F .text 0000013c swap_status_source 00001cb6 g F .text 000000a8 os_mbuf_append -00004d3e g F .text 0000000a mfg_read_tlv_mmr_ref +00004d9e g F .text 0000000a mfg_read_tlv_mmr_ref 00001b30 g F .text 00000014 os_set_env 00000658 g F .text 00000014 hal_bsp_flash_dev 0000139c g F .text 0000000c nrf52_periph_create -00004aae g F .text 0000000a flash_area_align -00002408 g F .text 00000008 disable_buffer -00002314 g F .text 00000048 console_printf -000022d2 g F .text 00000008 console_blocking_mode +00004b0e g F .text 0000000a flash_area_align +00002468 g F .text 00000008 disable_buffer +00002374 g F .text 00000048 console_printf +00002332 g F .text 00000008 console_blocking_mode 00000144 w F .text 00000002 I2S_IRQHandler 000005da g F .text 00000002 _init -00004198 g F .text 000000d0 hal_flash_erase -0000376e g F .text 00000006 boot_swap_info_off -00003904 g F .text 00000022 boot_write_swap_size -000021d0 g F .text 000000e4 pinetime_boot_display_image +000041f8 g F .text 000000d0 hal_flash_erase +000037ce g F .text 00000006 boot_swap_info_off +00003964 g F .text 00000022 boot_write_swap_size +00002230 g F .text 000000e4 pinetime_boot_display_image 00000144 w F .text 00000002 SWI4_EGU4_IRQHandler -00002ad4 g F .text 00000068 boot_write_status +00002b34 g F .text 00000068 boot_write_status 00000144 w F .text 00000002 TIMER0_IRQHandler -00003928 g F .text 000000d8 boot_swap_type_multi +00003988 g F .text 000000d8 boot_swap_type_multi 000000d8 g F .text 0000005c Reset_Handler 2000641a g O .bss 00000001 sysinit_active -00003854 g F .text 00000030 boot_read_swap_size -00002e76 g F .text 0000001e swap_set_copy_done -00001e0c g F .text 00000044 pinetime_boot_init +000038b4 g F .text 00000030 boot_read_swap_size +00002ed6 g F .text 0000001e swap_set_copy_done +00001e5c g F .text 00000044 pinetime_boot_init 00001bf8 g F .text 0000000a os_mbuf_pool_init 00001bc6 g F .text 0000001e os_default_irq_asm -00002dfa g F .text 0000007c swap_read_status -00004d48 g F .text 00000024 mfg_init +00002e5a g F .text 0000007c swap_read_status +00004da8 g F .text 00000024 mfg_init 00001d5e g F .text 00000014 os_mutex_init 00000148 g F .text 00000010 _sbrkInit 2000015c g .bssnz 00000000 __bssnz_end__ -00004ad0 g F .text 0000005c flash_map_init -000048f4 g F .text 00000014 vprintf +00004b30 g F .text 0000005c flash_map_init +00004954 g F .text 00000014 vprintf 00000144 w F .text 00000002 TIMER1_IRQHandler 20000000 g .bss 00000000 _ram_start 20000000 g .vector_relocation 00000000 __vector_tbl_reloc__ -00003264 g F .text 000000bc swap_read_status_bytes +000032c4 g F .text 000000bc swap_read_status_bytes 00000cfa g F .text 0000002c hal_gpio_init_in 00000144 w F .text 00000002 PWM2_IRQHandler 2000015c g .data 00000000 __data_end__ -00003f2a g F .text 0000013e mbedtls_sha256_finish_ret +00003f8a g F .text 0000013e mbedtls_sha256_finish_ret 00000144 w F .text 00000002 ECB_IRQHandler 20006410 g O .bss 00000004 g_os_time 00001120 g F .text 00000060 hal_spi_init @@ -435,73 +436,73 @@ SYMBOL TABLE: 00001aa8 g F .text 00000010 os_msys_reset 00000144 g F .text 00000002 Default_Handler 000005cc g F .text 0000000e _start -000038a4 g F .text 0000000e boot_write_copy_done -00003320 g F .text 0000001a boot_status_internal_off +00003904 g F .text 0000000e boot_write_copy_done +00003380 g F .text 0000001a boot_status_internal_off 00001b44 g F .text 00000006 os_arch_init_task_stack -0000568c g O .text 00000010 boot_img_magic +00005734 g O .text 00000010 boot_img_magic 00000d26 g F .text 00000038 hal_gpio_init_out 00000d80 g F .text 00000034 hal_gpio_read 2000014c g O .data 00000004 sysinit_panic_cb 00001954 g F .text 00000032 os_memblock_get -000024ec g F .text 00000030 mem_init_mbuf_pool -00002856 g F .text 00000022 boot_status_is_reset +0000254c g F .text 00000030 mem_init_mbuf_pool +000028b6 g F .text 00000022 boot_status_is_reset 00001758 g F .text 00000098 os_default_irq 000009ec g F .text 0000000e spiflash_sector_erase -00004ab8 g F .text 0000000a flash_area_erased_val -00002d70 g F .text 0000008a swap_status_init +00004b18 g F .text 0000000a flash_area_erased_val +00002dd0 g F .text 0000008a swap_status_init 2000640c g O .bss 00000004 g_os_last_ctx_sw_time 00001d72 g F .text 00000048 memcmp -000050c8 w F .text 00000002 .hidden __aeabi_ldiv0 -000024d4 g F .text 0000000c sysinit_start +00005128 w F .text 00000002 .hidden __aeabi_ldiv0 +00002534 g F .text 0000000c sysinit_start 000015e4 g F .text 000000f8 hal_timer_config -00003cba g F .text 00000012 flash_area_id_from_multi_image_slot -00002842 g F .text 00000014 boot_status_reset -00002b44 g F .text 00000058 boot_copy_region +00003d1a g F .text 00000012 flash_area_id_from_multi_image_slot +000028a2 g F .text 00000014 boot_status_reset +00002ba4 g F .text 00000058 boot_copy_region 00001a18 g F .text 0000004c os_msys_register -00004980 g F .text 00000040 flash_area_open +000049e0 g F .text 00000040 flash_area_open 200000e8 g O .data 00000040 spiflash_dev 00000144 w F .text 00000002 SAADC_IRQHandler -00003834 g F .text 00000020 boot_read_swap_state_by_id +00003894 g F .text 00000020 boot_read_swap_state_by_id 00001dd4 g F .text 00000038 memset 00000000 g .text 000000d8 __isr_vector 000005e2 g F .text 00000076 main 000011c8 g F .text 0000002c hal_spi_set_txrx_cb -00002480 g F .text 0000003c console_out_nolock +000024e0 g F .text 0000003c console_out_nolock 000006f6 g F .text 0000005a spiflash_read_jedec_id 00000144 w F .text 00000002 CCM_AAR_IRQHandler 00000144 w F .text 00000002 WDT_IRQHandler -000024e0 g F .text 0000000c sysinit_end -00004b2c g F .text 00000002 modlog_init +00002540 g F .text 0000000c sysinit_end +00004b8c g F .text 00000002 modlog_init 00001b4a g F .text 00000046 SVC_Handler -000040ce g F .text 00000054 hal_flash_read +0000412e g F .text 00000054 hal_flash_read 000016dc g F .text 00000030 hal_timer_read -00004a88 g F .text 00000026 flash_area_erase +00004ae8 g F .text 00000026 flash_area_erase 200063bc g O .bss 00000028 nrf52_hal_spi0 00001ca2 g F .text 00000014 os_mbuf_len 20006419 g O .bss 00000001 g_silence_console 00000144 w F .text 00000002 SWI5_EGU5_IRQHandler 20006420 g O .bss 00000004 flash_map_entries 00000000 g .text 00000000 __text -00004d08 g F .text 00000012 mfg_seek_next -00004ac2 g F .text 0000000e flash_area_read_is_empty -000022b4 g F .text 0000001e console_write -0000374c g F .text 00000022 boot_status_off +00004d68 g F .text 00000012 mfg_seek_next +00004b22 g F .text 0000000e flash_area_read_is_empty +00002314 g F .text 0000001e console_write +000037ac g F .text 00000022 boot_status_off 0000040c g F .text 000001c0 SystemInit 000017fc g F .text 0000000a os_cputime_get32 00000144 w F .text 00000002 RNG_IRQHandler -000040be g F .text 00000010 hal_flash_erased_val -00003a7e g F .text 000000ba bootutil_img_validate +0000411e g F .text 00000010 hal_flash_erased_val +00003ade g F .text 000000ba bootutil_img_validate 00000000 g .svc_table 00000000 SVC_Table 00000144 w F .text 00000002 RTC2_IRQHandler 00001180 g F .text 00000048 hal_spi_tx_val 00000860 g F .text 00000020 spiflash_write_enable 20010000 g .bss 00000000 __StackTop -000023c0 g F .text 00000048 console_flush +00002420 g F .text 00000048 console_flush 00000144 w F .text 00000002 PWM0_IRQHandler 00000144 w F .text 00000002 SWI3_EGU3_IRQHandler 00001034 g F .text 00000038 hal_spi_config -000049c0 g F .text 0000007c flash_area_to_sectors -000057fc g O .text 00000048 sysflash_map_dflt +00004a20 g F .text 0000007c flash_area_to_sectors +000058a4 g O .text 00000048 sysflash_map_dflt 200063e4 g O .bss 0000001c nrf52_hal_timer0 000000d8 g .text 00000000 __isr_vector_end 00000144 w F .text 00000002 RTC1_IRQHandler @@ -509,17 +510,17 @@ SYMBOL TABLE: 0000181c g F .text 00000008 os_cputime_delay_usecs 00000144 w F .text 00000002 SWI1_EGU1_IRQHandler 000007e0 g F .text 00000016 spiflash_wait_ready -00004304 g F .text 0000001e fwrite +00004364 g F .text 0000001e fwrite 00000a12 g F .text 00000010 spiflash_block_64k_erase -00004d6c g F .text 00000010 mfg_open +00004dcc g F .text 00000010 mfg_open 20000140 g O .data 00000008 g_os_run_list 00000678 g F .text 00000034 NVIC_Relocate -0000251c g F .text 0000001c sysinit_app +0000257c g F .text 0000001c sysinit_app 20000164 g O .bss 00000004 os_flags 0000188e g F .text 00000006 os_arch_restore_sr -00001e50 g F .text 0000001c pinetime_boot_check_button +00001ea0 g F .text 0000001c pinetime_boot_check_button 2000fe50 g *ABS* 000001b0 __StackLimit -00003ea4 g F .text 00000086 mbedtls_sha256_update_ret +00003f04 g F .text 00000086 mbedtls_sha256_update_ret 00000144 w F .text 00000002 SPIM2_SPIS2_SPI2_IRQHandler 00000144 w F .text 00000002 NFCT_IRQHandler 000003fc g F .text 00000010 SystemCoreClockUpdate @@ -528,32 +529,32 @@ SYMBOL TABLE: 00001b14 g F .text 0000000c os_time_get 000011f4 g F .text 000000ac hal_spi_txrx 00001c34 g F .text 00000036 os_mbuf_get_pkthdr -000050c8 w F .text 00000002 .hidden __aeabi_idiv0 -00003b38 g F .text 000000ca bootutil_tlv_iter_begin +00005128 w F .text 00000002 .hidden __aeabi_idiv0 +00003b98 g F .text 000000ca bootutil_tlv_iter_begin 00000b76 g F .text 00000006 _exit 000001a0 g F .text 0000004c hal_system_clock_start 0000013a w F .text 00000002 BusFault_Handler -0000436c g F .text 00000010 strlen +000043cc g F .text 00000010 strlen 00000750 g F .text 0000002a spiflash_read_status 00001986 g F .text 0000001e os_memblock_put_from_cb 000018b6 g F .text 00000010 os_eventq_init 00001b20 g F .text 00000010 os_time_advance -00004086 g F .text 00000028 hal_flash_init +000040e6 g F .text 00000028 hal_flash_init 00000144 w F .text 00000002 MWU_IRQHandler 00000138 w F .text 00000002 MemoryManagement_Handler 00000144 w F .text 00000002 COMP_LPCOMP_IRQHandler 0000184c g F .text 0000002c os_dev_initialize_all -00001e6c g F .text 00000058 boot_custom_start +00001ebc g F .text 00000068 boot_custom_start 0000066c g F .text 0000000c hal_bsp_init 00001894 g F .text 00000022 os_pkg_init 000010b8 g F .text 00000068 hal_spi_disable 000005dc g F .text 00000006 flash_device_base 00000a02 g F .text 00000010 spiflash_block_32k_erase -000048c8 g F .text 00000008 vfprintf -00003724 g F .text 0000000a boot_trailer_sz -00003c02 g F .text 000000b8 bootutil_tlv_iter_next -000038b2 g F .text 0000000e boot_write_image_ok -00003cd8 g F .text 000000a4 mbedtls_sha256_starts_ret +00004928 g F .text 00000008 vfprintf +00003784 g F .text 0000000a boot_trailer_sz +00003c62 g F .text 000000b8 bootutil_tlv_iter_next +00003912 g F .text 0000000e boot_write_image_ok +00003d38 g F .text 000000a4 mbedtls_sha256_starts_ret @@ -717,7 +718,7 @@ Reset_Handler: ldr r3, =__bss_end__ 114: 20006424 .word 0x20006424 ldr r1, =__etext - 118: 0000585c .word 0x0000585c + 118: 00005904 .word 0x00005904 ldr r2, =__data_start__ 11c: 200000d8 .word 0x200000d8 ldr r3, =__data_end__ @@ -1602,11 +1603,11 @@ main(void) 5fa: 2002 movs r0, #2 5fc: f001 f926 bl 184c sysinit(); - 600: f001 ff68 bl 24d4 - 604: f001 ff8a bl 251c - 608: f001 ff6a bl 24e0 + 600: f001 ff98 bl 2534 + 604: f001 ffba bl 257c + 608: f001 ff9a bl 2540 console_blocking_mode(); - 60c: f001 fe61 bl 22d2 + 60c: f001 fe91 bl 2332 console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); console_printf("Booting...\n"); console_flush(); */ @@ -1614,7 +1615,7 @@ main(void) rc = boot_go(&rsp); 610: a801 add r0, sp, #4 - 612: f002 fb63 bl 2cdc + 612: f002 fb93 bl 2d3c assert(rc == 0); 616: b998 cbnz r0, 640 @@ -1629,7 +1630,7 @@ main(void) boot_custom_start(flash_base, &rsp); 624: a901 add r1, sp, #4 626: 9800 ldr r0, [sp, #0] - 628: f001 fc20 bl 1e6c + 628: f001 fc48 bl 1ebc hal_system_start((void *)(flash_base + rsp.br_image_off + rsp.br_hdr->ih_hdr_size)); #endif @@ -1677,7 +1678,7 @@ hal_bsp_flash_dev(uint8_t id) 664: 2000 movs r0, #0 } 666: 4770 bx lr - 668: 000050cc .word 0x000050cc + 668: 0000512c .word 0x0000512c 0000066c : return cfg_pri; @@ -3468,7 +3469,7 @@ err: return -1; 1062: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff 1066: e7f4 b.n 1052 - 1068: 00005154 .word 0x00005154 + 1068: 000051b4 .word 0x000051b4 0000106c : int rc; @@ -3532,7 +3533,7 @@ err: return rc; } 10b2: 4770 bx lr - 10b4: 00005154 .word 0x00005154 + 10b4: 000051b4 .word 0x000051b4 000010b8 : int rc; @@ -3620,7 +3621,7 @@ err: return rc; 1118: e7e6 b.n 10e8 111a: bf00 nop - 111c: 00005154 .word 0x00005154 + 111c: 000051b4 .word 0x000051b4 00001120 : NRF52_HAL_SPI_RESOLVE(spi_num, spi); @@ -3681,7 +3682,7 @@ err: 1170: 2016 movs r0, #22 return (rc); 1172: e7fc b.n 116e - 1174: 00005154 .word 0x00005154 + 1174: 000051b4 .word 0x000051b4 1178: 40003000 .word 0x40003000 117c: 00000e25 .word 0x00000e25 @@ -3735,7 +3736,7 @@ err: } 11c0: 4770 bx lr 11c2: bf00 nop - 11c4: 00005154 .word 0x00005154 + 11c4: 000051b4 .word 0x000051b4 000011c8 : { @@ -3780,7 +3781,7 @@ err: return rc; } 11ee: 4770 bx lr - 11f0: 00005154 .word 0x00005154 + 11f0: 000051b4 .word 0x000051b4 000011f4 : NRF_SPI_Type *spi; @@ -3925,7 +3926,7 @@ err: 1296: 2016 movs r0, #22 1298: e7f4 b.n 1284 129a: bf00 nop - 129c: 00005154 .word 0x00005154 + 129c: 000051b4 .word 0x000051b4 000012a0 : #include "mcu/cmsis_nvic.h" @@ -4120,7 +4121,7 @@ nrf52_periph_create_spi(void) 1390: 4619 mov r1, r3 1392: 4618 mov r0, r3 1394: f000 f9ba bl 170c <__assert_func> - 1398: 00005160 .word 0x00005160 + 1398: 000051c0 .word 0x000051c0 0000139c : @@ -4604,7 +4605,7 @@ err: } 15d0: 4770 bx lr 15d2: bf00 nop - 15d4: 00005164 .word 0x00005164 + 15d4: 000051c4 .word 0x000051c4 15d8: 40008000 .word 0x40008000 15dc: e000e100 .word 0xe000e100 15e0: 00001575 .word 0x00001575 @@ -4801,7 +4802,7 @@ err: return 0; 16cc: 2000 movs r0, #0 16ce: e7ef b.n 16b0 - 16d0: 00005164 .word 0x00005164 + 16d0: 000051c4 .word 0x000051c4 16d4: 00f42400 .word 0x00f42400 16d8: e000e100 .word 0xe000e100 @@ -4847,7 +4848,7 @@ err: 1700: 4619 mov r1, r3 1702: 4618 mov r0, r3 1704: f000 f802 bl 170c <__assert_func> - 1708: 00005164 .word 0x00005164 + 1708: 000051c4 .word 0x000051c4 0000170c <__assert_func>: } @@ -4869,14 +4870,14 @@ __assert_func(const char *file, int line, const char *func, const char *e) 1714: f000 f8b5 bl 1882 (void)sr; console_blocking_mode(); - 1718: f000 fddb bl 22d2 + 1718: f000 fe0b bl 2332 OS_PRINT_ASSERT(file, line, func, e); 171c: b18c cbz r4, 1742 <__assert_func+0x36> 171e: 4633 mov r3, r6 1720: 4622 mov r2, r4 1722: 4629 mov r1, r5 1724: 4809 ldr r0, [pc, #36] ; (174c <__assert_func+0x40>) - 1726: f000 fdf5 bl 2314 + 1726: f000 fe25 bl 2374 #if MYNEWT_VAL(OS_ASSERT_CB) os_assert_cb(); @@ -4904,11 +4905,11 @@ __assert_func(const char *file, int line, const char *func, const char *e) OS_PRINT_ASSERT(file, line, func, e); 1742: 4629 mov r1, r5 1744: 4803 ldr r0, [pc, #12] ; (1754 <__assert_func+0x48>) - 1746: f000 fde5 bl 2314 + 1746: f000 fe15 bl 2374 174a: e7ee b.n 172a <__assert_func+0x1e> - 174c: 0000518c .word 0x0000518c + 174c: 000051ec .word 0x000051ec 1750: e000ed00 .word 0xe000ed00 - 1754: 0000517c .word 0x0000517c + 1754: 000051dc .word 0x000051dc 00001758 : } @@ -4925,7 +4926,7 @@ os_default_irq(struct trap_frame *tf) #endif console_blocking_mode(); - 175e: f000 fdb8 bl 22d2 + 175e: f000 fde8 bl 2332 console_printf("Unhandled interrupt (%ld), exception sp 0x%08lx\n", SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk, (uint32_t)tf->ef); 1762: 4d1b ldr r5, [pc, #108] ; (17d0 ) @@ -4934,7 +4935,7 @@ os_default_irq(struct trap_frame *tf) 1766: 6822 ldr r2, [r4, #0] 1768: f3c1 0108 ubfx r1, r1, #0, #9 176c: 4819 ldr r0, [pc, #100] ; (17d4 ) - 176e: f000 fdd1 bl 2314 + 176e: f000 fe01 bl 2374 console_printf(" r0:0x%08lx r1:0x%08lx r2:0x%08lx r3:0x%08lx\n", tf->ef->r0, tf->ef->r1, tf->ef->r2, tf->ef->r3); 1772: 6820 ldr r0, [r4, #0] @@ -4945,7 +4946,7 @@ os_default_irq(struct trap_frame *tf) 177a: 68c0 ldr r0, [r0, #12] 177c: 9000 str r0, [sp, #0] 177e: 4816 ldr r0, [pc, #88] ; (17d8 ) - 1780: f000 fdc8 bl 2314 + 1780: f000 fdf8 bl 2374 console_printf(" r4:0x%08lx r5:0x%08lx r6:0x%08lx r7:0x%08lx\n", 1784: 6923 ldr r3, [r4, #16] 1786: 9300 str r3, [sp, #0] @@ -4953,7 +4954,7 @@ os_default_irq(struct trap_frame *tf) 178a: 68a2 ldr r2, [r4, #8] 178c: 6861 ldr r1, [r4, #4] 178e: 4813 ldr r0, [pc, #76] ; (17dc ) - 1790: f000 fdc0 bl 2314 + 1790: f000 fdf0 bl 2374 tf->r4, tf->r5, tf->r6, tf->r7); console_printf(" r8:0x%08lx r9:0x%08lx r10:0x%08lx r11:0x%08lx\n", 1794: 6a23 ldr r3, [r4, #32] @@ -4962,7 +4963,7 @@ os_default_irq(struct trap_frame *tf) 179a: 69a2 ldr r2, [r4, #24] 179c: 6961 ldr r1, [r4, #20] 179e: 4810 ldr r0, [pc, #64] ; (17e0 ) - 17a0: f000 fdb8 bl 2314 + 17a0: f000 fde8 bl 2374 tf->r8, tf->r9, tf->r10, tf->r11); console_printf("r12:0x%08lx lr:0x%08lx pc:0x%08lx psr:0x%08lx\n", tf->ef->r12, tf->ef->lr, tf->ef->pc, tf->ef->psr); @@ -4974,19 +4975,19 @@ os_default_irq(struct trap_frame *tf) 17ac: 69c0 ldr r0, [r0, #28] 17ae: 9000 str r0, [sp, #0] 17b0: 480c ldr r0, [pc, #48] ; (17e4 ) - 17b2: f000 fdaf bl 2314 + 17b2: f000 fddf bl 2374 console_printf("ICSR:0x%08lx HFSR:0x%08lx CFSR:0x%08lx\n", 17b6: 6869 ldr r1, [r5, #4] 17b8: 6aea ldr r2, [r5, #44] ; 0x2c 17ba: 6aab ldr r3, [r5, #40] ; 0x28 17bc: 480a ldr r0, [pc, #40] ; (17e8 ) - 17be: f000 fda9 bl 2314 + 17be: f000 fdd9 bl 2374 SCB->ICSR, SCB->HFSR, SCB->CFSR); console_printf("BFAR:0x%08lx MMFAR:0x%08lx\n", SCB->BFAR, SCB->MMFAR); 17c2: 6ba9 ldr r1, [r5, #56] ; 0x38 17c4: 6b6a ldr r2, [r5, #52] ; 0x34 17c6: 4809 ldr r0, [pc, #36] ; (17ec ) - 17c8: f000 fda4 bl 2314 + 17c8: f000 fdd4 bl 2374 : "r0" ); } @@ -4995,13 +4996,13 @@ os_default_irq(struct trap_frame *tf) hal_system_reset(); 17cc: f7fe fcd2 bl 174 17d0: e000ed00 .word 0xe000ed00 - 17d4: 000051a4 .word 0x000051a4 - 17d8: 000051d8 .word 0x000051d8 - 17dc: 0000520c .word 0x0000520c - 17e0: 00005240 .word 0x00005240 - 17e4: 00005274 .word 0x00005274 - 17e8: 000052a8 .word 0x000052a8 - 17ec: 000052d0 .word 0x000052d0 + 17d4: 00005204 .word 0x00005204 + 17d8: 00005238 .word 0x00005238 + 17dc: 0000526c .word 0x0000526c + 17e0: 000052a0 .word 0x000052a0 + 17e4: 000052d4 .word 0x000052d4 + 17e8: 00005308 .word 0x00005308 + 17ec: 00005330 .word 0x00005330 000017f0 : struct os_cputime_data g_os_cputime; @@ -5673,7 +5674,7 @@ os_msys_init_once(void *data, struct os_mempool *mempool, 1a6c: 9501 str r5, [sp, #4] 1a6e: 9d06 ldr r5, [sp, #24] 1a70: 9500 str r5, [sp, #0] - 1a72: f000 fd3b bl 24ec + 1a72: f000 fd6b bl 254c name); SYSINIT_PANIC_ASSERT(rc == 0); 1a76: b138 cbz r0, 1a88 @@ -5775,7 +5776,7 @@ os_msys_init(void) } 1afe: b003 add sp, #12 1b00: f85d fb04 ldr.w pc, [sp], #4 - 1b04: 000052ec .word 0x000052ec + 1b04: 0000534c .word 0x0000534c 1b08: 20004a68 .word 0x20004a68 1b0c: 20004a74 .word 0x20004a74 1b10: 20000168 .word 0x20000168 @@ -6602,3426 +6603,3430 @@ void *memset(void *dst, int c, size_t n) 1e08: bc30 pop {r4, r5} 1e0a: 4770 bx lr -00001e0c : - -#define PUSH_BUTTON_IN 13 // P0.13: PUSH BUTTON_IN -#define PUSH_BUTTON_OUT 15 // P0.15/TRACEDATA2: PUSH BUTTON_OUT - -/// Init the display and render the boot graphic. Called by sysinit() during startup, defined in pkg.yml. +00001e0c : +/// Relocate the Arm Vector Table from vector_table to relocated_vector_table. +/// vector_table must be aligned to 0x100 page boundary. +static void relocate_vector_table(void *vector_table, void *relocated_vector_table) { + uint32_t *current_location = (uint32_t *) vector_table; + uint32_t *new_location = (uint32_t *) relocated_vector_table; + if (new_location == current_location) { return; } // No need to relocate + 1e0c: 4288 cmp r0, r1 + 1e0e: d021 beq.n 1e54 +static void relocate_vector_table(void *vector_table, void *relocated_vector_table) { + 1e10: b538 push {r3, r4, r5, lr} + // Check whether we need to copy the vectors. + int vector_diff = 0; // Non-zero if a vector is different + for (int i = 0; i < NVIC_NUM_VECTORS; i++) { + 1e12: 2300 movs r3, #0 + 1e14: 2b35 cmp r3, #53 ; 0x35 + 1e16: dc07 bgt.n 1e28 + if (new_location[i] != current_location[i]) { + 1e18: f851 5023 ldr.w r5, [r1, r3, lsl #2] + 1e1c: f850 4023 ldr.w r4, [r0, r3, lsl #2] + 1e20: 42a5 cmp r5, r4 + 1e22: d103 bne.n 1e2c + for (int i = 0; i < NVIC_NUM_VECTORS; i++) { + 1e24: 3301 adds r3, #1 + 1e26: e7f5 b.n 1e14 + int vector_diff = 0; // Non-zero if a vector is different + 1e28: 2300 movs r3, #0 + 1e2a: e000 b.n 1e2e + vector_diff = 1; + 1e2c: 2301 movs r3, #1 + 1e2e: 460c mov r4, r1 + 1e30: 4605 mov r5, r0 + break; + } + } + // If we need to copy the vectors, erase the flash ROM and write the vectors. + if (vector_diff) { + 1e32: b913 cbnz r3, 1e3a + vector_table, // From the original address + 0x100 // Assume that we copy an entire page + ); + } + // Point VTOR Register in the System Control Block to the relocated vector table. + *SCB_VTOR = (uint32_t) relocated_vector_table; + 1e34: 4b08 ldr r3, [pc, #32] ; (1e58 ) + 1e36: 601c str r4, [r3, #0] +} + 1e38: bd38 pop {r3, r4, r5, pc} + hal_flash_erase( // Erase... + 1e3a: f44f 7280 mov.w r2, #256 ; 0x100 + 1e3e: 2000 movs r0, #0 + 1e40: f002 f9da bl 41f8 + hal_flash_write( // Write... + 1e44: f44f 7380 mov.w r3, #256 ; 0x100 + 1e48: 462a mov r2, r5 + 1e4a: 4621 mov r1, r4 + 1e4c: 2000 movs r0, #0 + 1e4e: f002 f999 bl 4184 + 1e52: e7ef b.n 1e34 + 1e54: 4770 bx lr + 1e56: bf00 nop + 1e58: e000ed08 .word 0xe000ed08 + +00001e5c : void pinetime_boot_init(void) { - 1e0c: b508 push {r3, lr} + 1e5c: b508 push {r3, lr} console_printf("Starting Bootloader...\n"); console_flush(); - 1e0e: 480e ldr r0, [pc, #56] ; (1e48 ) - 1e10: f000 fa80 bl 2314 - 1e14: f000 fad4 bl 23c0 - - // Init the push button. The button on the side of the PineTime is disabled by default. To enable it, drive the button out pin (P0.15) high. - // While enabled, the button in pin (P0.13) will be high when the button is pressed, and low when it is not pressed. + 1e5e: 480e ldr r0, [pc, #56] ; (1e98 ) + 1e60: f000 fa88 bl 2374 + 1e64: f000 fadc bl 2420 hal_gpio_init_in(PUSH_BUTTON_IN, HAL_GPIO_PULL_DOWN); // TODO: Doesn't seem to work - 1e18: 2102 movs r1, #2 - 1e1a: 200d movs r0, #13 - 1e1c: f7fe ff6d bl cfa + 1e68: 2102 movs r1, #2 + 1e6a: 200d movs r0, #13 + 1e6c: f7fe ff45 bl cfa hal_gpio_init_out(PUSH_BUTTON_OUT, 1); - 1e20: 2101 movs r1, #1 - 1e22: 200f movs r0, #15 - 1e24: f7fe ff7f bl d26 + 1e70: 2101 movs r1, #1 + 1e72: 200f movs r0, #15 + 1e74: f7fe ff57 bl d26 hal_gpio_write(PUSH_BUTTON_OUT, 1); // Enable the button - 1e28: 2101 movs r1, #1 - 1e2a: 200f movs r0, #15 - 1e2c: f7fe ff97 bl d5e - - // Display the image. + 1e78: 2101 movs r1, #1 + 1e7a: 200f movs r0, #15 + 1e7c: f7fe ff6f bl d5e pinetime_boot_display_image(); - 1e30: f000 f9ce bl 21d0 - console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); - 1e34: 200d movs r0, #13 - 1e36: f7fe ffa3 bl d80 - 1e3a: 4601 mov r1, r0 - 1e3c: 4803 ldr r0, [pc, #12] ; (1e4c ) - 1e3e: f000 fa69 bl 2314 - 1e42: f000 fabd bl 23c0 -} - 1e46: bd08 pop {r3, pc} - 1e48: 00005308 .word 0x00005308 - 1e4c: 00005320 .word 0x00005320 - -00001e50 : - rsp->br_hdr->ih_hdr_size - )); -} - -/// Check whether the watch button is pressed + 1e80: f000 f9d6 bl 2230 + console_printf("Check button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); + 1e84: 200d movs r0, #13 + 1e86: f7fe ff7b bl d80 + 1e8a: 4601 mov r1, r0 + 1e8c: 4803 ldr r0, [pc, #12] ; (1e9c ) + 1e8e: f000 fa71 bl 2374 + 1e92: f000 fac5 bl 2420 +} + 1e96: bd08 pop {r3, pc} + 1e98: 000053a8 .word 0x000053a8 + 1e9c: 000053c0 .word 0x000053c0 + +00001ea0 : void pinetime_boot_check_button(void) { - 1e50: b510 push {r4, lr} + 1ea0: b510 push {r4, lr} for (int i = 0; i < 1000000; i++) { - 1e52: 2400 movs r4, #0 - 1e54: e003 b.n 1e5e + 1ea2: 2400 movs r4, #0 + 1ea4: e003 b.n 1eae hal_gpio_read(PUSH_BUTTON_IN); // TODO: Doesn't seem to work - 1e56: 200d movs r0, #13 - 1e58: f7fe ff92 bl d80 + 1ea6: 200d movs r0, #13 + 1ea8: f7fe ff6a bl d80 for (int i = 0; i < 1000000; i++) { - 1e5c: 3401 adds r4, #1 - 1e5e: 4b02 ldr r3, [pc, #8] ; (1e68 ) - 1e60: 429c cmp r4, r3 - 1e62: ddf8 ble.n 1e56 - } + 1eac: 3401 adds r4, #1 + 1eae: 4b02 ldr r3, [pc, #8] ; (1eb8 ) + 1eb0: 429c cmp r4, r3 + 1eb2: ddf8 ble.n 1ea6 } - 1e64: bd10 pop {r4, pc} - 1e66: bf00 nop - 1e68: 000f423f .word 0x000f423f + 1eb4: bd10 pop {r4, pc} + 1eb6: bf00 nop + 1eb8: 000f423f .word 0x000f423f -00001e6c : +00001ebc : ) { - 1e6c: b570 push {r4, r5, r6, lr} - 1e6e: 4606 mov r6, r0 - 1e70: 460d mov r5, r1 - console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); - 1e72: 200d movs r0, #13 - 1e74: f7fe ff84 bl d80 - 1e78: 4601 mov r1, r0 - 1e7a: 4810 ldr r0, [pc, #64] ; (1ebc ) - 1e7c: f000 fa4a bl 2314 - 1e80: f000 fa9e bl 23c0 + 1ebc: b570 push {r4, r5, r6, lr} + 1ebe: 4606 mov r6, r0 + 1ec0: 460d mov r5, r1 + console_printf("Waiting 5 seconds for button: %d...\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); + 1ec2: 200d movs r0, #13 + 1ec4: f7fe ff5c bl d80 + 1ec8: 4601 mov r1, r0 + 1eca: 4813 ldr r0, [pc, #76] ; (1f18 ) + 1ecc: f000 fa52 bl 2374 + 1ed0: f000 faa6 bl 2420 for (int i = 0; i < 15; i++) { - 1e84: 2400 movs r4, #0 - 1e86: e002 b.n 1e8e + 1ed4: 2400 movs r4, #0 + 1ed6: e002 b.n 1ede pinetime_boot_check_button(); - 1e88: f7ff ffe2 bl 1e50 + 1ed8: f7ff ffe2 bl 1ea0 for (int i = 0; i < 15; i++) { - 1e8c: 3401 adds r4, #1 - 1e8e: 2c0e cmp r4, #14 - 1e90: ddfa ble.n 1e88 - console_printf("Button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); - 1e92: 200d movs r0, #13 - 1e94: f7fe ff74 bl d80 - 1e98: 4601 mov r1, r0 - 1e9a: 4808 ldr r0, [pc, #32] ; (1ebc ) - 1e9c: f000 fa3a bl 2314 - 1ea0: f000 fa8e bl 23c0 + 1edc: 3401 adds r4, #1 + 1ede: 2c0e cmp r4, #14 + 1ee0: ddfa ble.n 1ed8 + console_printf("Waited for button: %d\n", hal_gpio_read(PUSH_BUTTON_IN)); console_flush(); + 1ee2: 200d movs r0, #13 + 1ee4: f7fe ff4c bl d80 + 1ee8: 4601 mov r1, r0 + 1eea: 480c ldr r0, [pc, #48] ; (1f1c ) + 1eec: f000 fa42 bl 2374 + 1ef0: f000 fa96 bl 2420 console_printf("Bootloader done\n"); console_flush(); - 1ea4: 4806 ldr r0, [pc, #24] ; (1ec0 ) - 1ea6: f000 fa35 bl 2314 - 1eaa: f000 fa89 bl 23c0 - rsp->br_image_off + - 1eae: 68a8 ldr r0, [r5, #8] - flash_base + - 1eb0: 4430 add r0, r6 - rsp->br_hdr->ih_hdr_size - 1eb2: 682b ldr r3, [r5, #0] - 1eb4: 891b ldrh r3, [r3, #8] - hal_system_start((void *)( - 1eb6: 4418 add r0, r3 - 1eb8: f002 fa1f bl 42fa - 1ebc: 00005320 .word 0x00005320 - 1ec0: 000052f4 .word 0x000052f4 - -00001ec4 : + 1ef4: 480a ldr r0, [pc, #40] ; (1f20 ) + 1ef6: f000 fa3d bl 2374 + 1efa: f000 fa91 bl 2420 + rsp->br_image_off + // Offset of FLASH_AREA_IMAGE_0 (application image): 0x8000 + 1efe: 68ac ldr r4, [r5, #8] + flash_base + // 0 + 1f00: 4434 add r4, r6 + rsp->br_hdr->ih_hdr_size // Size of MCUBoot image header (0x20) + 1f02: 682b ldr r3, [r5, #0] + 1f04: 891b ldrh r3, [r3, #8] + rsp->br_image_off + // Offset of FLASH_AREA_IMAGE_0 (application image): 0x8000 + 1f06: 441c add r4, r3 + relocate_vector_table( // Relocate the vector table... + 1f08: f44f 41fe mov.w r1, #32512 ; 0x7f00 + 1f0c: 4620 mov r0, r4 + 1f0e: f7ff ff7d bl 1e0c + hal_system_start(vector_table); + 1f12: 4620 mov r0, r4 + 1f14: f002 fa21 bl 435a + 1f18: 00005354 .word 0x00005354 + 1f1c: 0000537c .word 0x0000537c + 1f20: 00005394 .word 0x00005394 + +00001f24 : delay_ms(200); return 0; } /// Reset the display controller static int hard_reset(void) { - 1ec4: b508 push {r3, lr} + 1f24: b508 push {r3, lr} hal_gpio_write(DISPLAY_RST, 1); - 1ec6: 2101 movs r1, #1 - 1ec8: 201a movs r0, #26 - 1eca: f7fe ff48 bl d5e + 1f26: 2101 movs r1, #1 + 1f28: 201a movs r0, #26 + 1f2a: f7fe ff18 bl d5e hal_gpio_write(DISPLAY_RST, 0); - 1ece: 2100 movs r1, #0 - 1ed0: 201a movs r0, #26 - 1ed2: f7fe ff44 bl d5e + 1f2e: 2100 movs r1, #0 + 1f30: 201a movs r0, #26 + 1f32: f7fe ff14 bl d5e hal_gpio_write(DISPLAY_RST, 1); - 1ed6: 2101 movs r1, #1 - 1ed8: 201a movs r0, #26 - 1eda: f7fe ff40 bl d5e + 1f36: 2101 movs r1, #1 + 1f38: 201a movs r0, #26 + 1f3a: f7fe ff10 bl d5e return 0; } - 1ede: 2000 movs r0, #0 - 1ee0: bd08 pop {r3, pc} + 1f3e: 2000 movs r0, #0 + 1f40: bd08 pop {r3, pc} -00001ee2 : +00001f42 : hal_gpio_write(DISPLAY_CS, 1); return 0; } /// Sleep for the specified number of milliseconds static void delay_ms(uint32_t ms) { - 1ee2: b508 push {r3, lr} + 1f42: b508 push {r3, lr} #if MYNEWT_VAL(OS_SCHEDULING) // If Task Scheduler is enabled (i.e. not MCUBoot)... uint32_t delay_ticks = ms * OS_TICKS_PER_SEC / 1000; os_time_delay(delay_ticks); #else // If Task Scheduler is disabled (i.e. MCUBoot)... // os_time_delay() doesn't work in MCUBoot because the scheduler has not started pinetime_boot_check_button(); - 1ee4: f7ff ffb4 bl 1e50 + 1f44: f7ff ffac bl 1ea0 #endif // MYNEWT_VAL(OS_SCHEDULING) } - 1ee8: bd08 pop {r3, pc} + 1f48: bd08 pop {r3, pc} -00001eea : +00001f4a : if (len == 0) { return 0; } - 1eea: b909 cbnz r1, 1ef0 + 1f4a: b909 cbnz r1, 1f50 } - 1eec: 2000 movs r0, #0 - 1eee: 4770 bx lr + 1f4c: 2000 movs r0, #0 + 1f4e: 4770 bx lr static int transmit_spi(const uint8_t *data, uint16_t len) { - 1ef0: b538 push {r3, r4, r5, lr} - 1ef2: 460d mov r5, r1 - 1ef4: 4604 mov r4, r0 + 1f50: b538 push {r3, r4, r5, lr} + 1f52: 460d mov r5, r1 + 1f54: 4604 mov r4, r0 hal_gpio_write(DISPLAY_CS, 0); - 1ef6: 2100 movs r1, #0 - 1ef8: 2019 movs r0, #25 - 1efa: f7fe ff30 bl d5e + 1f56: 2100 movs r1, #0 + 1f58: 2019 movs r0, #25 + 1f5a: f7fe ff00 bl d5e int rc = hal_spi_txrx(DISPLAY_SPI, - 1efe: 462b mov r3, r5 - 1f00: 2200 movs r2, #0 - 1f02: 4621 mov r1, r4 - 1f04: 4610 mov r0, r2 - 1f06: f7ff f975 bl 11f4 + 1f5e: 462b mov r3, r5 + 1f60: 2200 movs r2, #0 + 1f62: 4621 mov r1, r4 + 1f64: 4610 mov r0, r2 + 1f66: f7ff f945 bl 11f4 assert(rc == 0); - 1f0a: b928 cbnz r0, 1f18 + 1f6a: b928 cbnz r0, 1f78 hal_gpio_write(DISPLAY_CS, 1); - 1f0c: 2101 movs r1, #1 - 1f0e: 2019 movs r0, #25 - 1f10: f7fe ff25 bl d5e + 1f6c: 2101 movs r1, #1 + 1f6e: 2019 movs r0, #25 + 1f70: f7fe fef5 bl d5e } - 1f14: 2000 movs r0, #0 - 1f16: bd38 pop {r3, r4, r5, pc} + 1f74: 2000 movs r0, #0 + 1f76: bd38 pop {r3, r4, r5, pc} assert(rc == 0); - 1f18: 2300 movs r3, #0 - 1f1a: 461a mov r2, r3 - 1f1c: 4619 mov r1, r3 - 1f1e: 4618 mov r0, r3 - 1f20: f7ff fbf4 bl 170c <__assert_func> + 1f78: 2300 movs r3, #0 + 1f7a: 461a mov r2, r3 + 1f7c: 4619 mov r1, r3 + 1f7e: 4618 mov r0, r3 + 1f80: f7ff fbc4 bl 170c <__assert_func> -00001f24 : +00001f84 : static int write_data(const uint8_t *data, uint16_t len) { - 1f24: b538 push {r3, r4, r5, lr} - 1f26: 4604 mov r4, r0 - 1f28: 460d mov r5, r1 + 1f84: b538 push {r3, r4, r5, lr} + 1f86: 4604 mov r4, r0 + 1f88: 460d mov r5, r1 hal_gpio_write(DISPLAY_DC, 1); - 1f2a: 2101 movs r1, #1 - 1f2c: 2012 movs r0, #18 - 1f2e: f7fe ff16 bl d5e + 1f8a: 2101 movs r1, #1 + 1f8c: 2012 movs r0, #18 + 1f8e: f7fe fee6 bl d5e transmit_spi(data, len); - 1f32: 4629 mov r1, r5 - 1f34: 4620 mov r0, r4 - 1f36: f7ff ffd8 bl 1eea + 1f92: 4629 mov r1, r5 + 1f94: 4620 mov r0, r4 + 1f96: f7ff ffd8 bl 1f4a } - 1f3a: 2000 movs r0, #0 - 1f3c: bd38 pop {r3, r4, r5, pc} + 1f9a: 2000 movs r0, #0 + 1f9c: bd38 pop {r3, r4, r5, pc} -00001f3e : +00001f9e : static int write_command(uint8_t command, const uint8_t *params, uint16_t len) { - 1f3e: b570 push {r4, r5, r6, lr} - 1f40: b082 sub sp, #8 - 1f42: 460d mov r5, r1 - 1f44: 4616 mov r6, r2 - 1f46: ac02 add r4, sp, #8 - 1f48: f804 0d01 strb.w r0, [r4, #-1]! + 1f9e: b570 push {r4, r5, r6, lr} + 1fa0: b082 sub sp, #8 + 1fa2: 460d mov r5, r1 + 1fa4: 4616 mov r6, r2 + 1fa6: ac02 add r4, sp, #8 + 1fa8: f804 0d01 strb.w r0, [r4, #-1]! hal_gpio_write(DISPLAY_DC, 0); - 1f4c: 2100 movs r1, #0 - 1f4e: 2012 movs r0, #18 - 1f50: f7fe ff05 bl d5e + 1fac: 2100 movs r1, #0 + 1fae: 2012 movs r0, #18 + 1fb0: f7fe fed5 bl d5e int rc = transmit_spi(&command, 1); - 1f54: 2101 movs r1, #1 - 1f56: 4620 mov r0, r4 - 1f58: f7ff ffc7 bl 1eea + 1fb4: 2101 movs r1, #1 + 1fb6: 4620 mov r0, r4 + 1fb8: f7ff ffc7 bl 1f4a assert(rc == 0); - 1f5c: b920 cbnz r0, 1f68 + 1fbc: b920 cbnz r0, 1fc8 if (params != NULL && len > 0) { - 1f5e: b105 cbz r5, 1f62 - 1f60: b946 cbnz r6, 1f74 + 1fbe: b105 cbz r5, 1fc2 + 1fc0: b946 cbnz r6, 1fd4 } - 1f62: 2000 movs r0, #0 - 1f64: b002 add sp, #8 - 1f66: bd70 pop {r4, r5, r6, pc} + 1fc2: 2000 movs r0, #0 + 1fc4: b002 add sp, #8 + 1fc6: bd70 pop {r4, r5, r6, pc} assert(rc == 0); - 1f68: 2300 movs r3, #0 - 1f6a: 461a mov r2, r3 - 1f6c: 4619 mov r1, r3 - 1f6e: 4618 mov r0, r3 - 1f70: f7ff fbcc bl 170c <__assert_func> + 1fc8: 2300 movs r3, #0 + 1fca: 461a mov r2, r3 + 1fcc: 4619 mov r1, r3 + 1fce: 4618 mov r0, r3 + 1fd0: f7ff fb9c bl 170c <__assert_func> rc = write_data(params, len); - 1f74: 4631 mov r1, r6 - 1f76: 4628 mov r0, r5 - 1f78: f7ff ffd4 bl 1f24 + 1fd4: 4631 mov r1, r6 + 1fd6: 4628 mov r0, r5 + 1fd8: f7ff ffd4 bl 1f84 assert(rc == 0); - 1f7c: 2800 cmp r0, #0 - 1f7e: d0f0 beq.n 1f62 - 1f80: 2300 movs r3, #0 - 1f82: 461a mov r2, r3 - 1f84: 4619 mov r1, r3 - 1f86: 4618 mov r0, r3 - 1f88: f7ff fbc0 bl 170c <__assert_func> - -00001f8c : + 1fdc: 2800 cmp r0, #0 + 1fde: d0f0 beq.n 1fc2 + 1fe0: 2300 movs r3, #0 + 1fe2: 461a mov r2, r3 + 1fe4: 4619 mov r1, r3 + 1fe6: 4618 mov r0, r3 + 1fe8: f7ff fb90 bl 170c <__assert_func> + +00001fec : static int init_display(void) { - 1f8c: b508 push {r3, lr} + 1fec: b508 push {r3, lr} rc = hal_gpio_init_out(DISPLAY_RST, 1); assert(rc == 0); - 1f8e: 2101 movs r1, #1 - 1f90: 201a movs r0, #26 - 1f92: f7fe fec8 bl d26 - 1f96: 2800 cmp r0, #0 - 1f98: d16e bne.n 2078 + 1fee: 2101 movs r1, #1 + 1ff0: 201a movs r0, #26 + 1ff2: f7fe fe98 bl d26 + 1ff6: 2800 cmp r0, #0 + 1ff8: d16e bne.n 20d8 rc = hal_gpio_init_out(DISPLAY_CS, 1); assert(rc == 0); - 1f9a: 2101 movs r1, #1 - 1f9c: 2019 movs r0, #25 - 1f9e: f7fe fec2 bl d26 - 1fa2: 2800 cmp r0, #0 - 1fa4: d16e bne.n 2084 + 1ffa: 2101 movs r1, #1 + 1ffc: 2019 movs r0, #25 + 1ffe: f7fe fe92 bl d26 + 2002: 2800 cmp r0, #0 + 2004: d16e bne.n 20e4 rc = hal_gpio_init_out(DISPLAY_DC, 0); assert(rc == 0); - 1fa6: 2100 movs r1, #0 - 1fa8: 2012 movs r0, #18 - 1faa: f7fe febc bl d26 - 1fae: 2800 cmp r0, #0 - 1fb0: d16e bne.n 2090 + 2006: 2100 movs r1, #0 + 2008: 2012 movs r0, #18 + 200a: f7fe fe8c bl d26 + 200e: 2800 cmp r0, #0 + 2010: d16e bne.n 20f0 rc = hal_gpio_init_out(DISPLAY_HIGH, 0); assert(rc == 0); - 1fb2: 2100 movs r1, #0 - 1fb4: 2017 movs r0, #23 - 1fb6: f7fe feb6 bl d26 - 1fba: 2800 cmp r0, #0 - 1fbc: d16e bne.n 209c + 2012: 2100 movs r1, #0 + 2014: 2017 movs r0, #23 + 2016: f7fe fe86 bl d26 + 201a: 2800 cmp r0, #0 + 201c: d16e bne.n 20fc hard_reset(); - 1fbe: f7ff ff81 bl 1ec4 + 201e: f7ff ff81 bl 1f24 write_command(SWRESET, NULL, 0); - 1fc2: 2200 movs r2, #0 - 1fc4: 4611 mov r1, r2 - 1fc6: 2001 movs r0, #1 - 1fc8: f7ff ffb9 bl 1f3e + 2022: 2200 movs r2, #0 + 2024: 4611 mov r1, r2 + 2026: 2001 movs r0, #1 + 2028: f7ff ffb9 bl 1f9e delay_ms(200); - 1fcc: 20c8 movs r0, #200 ; 0xc8 - 1fce: f7ff ff88 bl 1ee2 + 202c: 20c8 movs r0, #200 ; 0xc8 + 202e: f7ff ff88 bl 1f42 write_command(SLPOUT, NULL, 0); - 1fd2: 2200 movs r2, #0 - 1fd4: 4611 mov r1, r2 - 1fd6: 2011 movs r0, #17 - 1fd8: f7ff ffb1 bl 1f3e + 2032: 2200 movs r2, #0 + 2034: 4611 mov r1, r2 + 2036: 2011 movs r0, #17 + 2038: f7ff ffb1 bl 1f9e delay_ms(200); - 1fdc: 20c8 movs r0, #200 ; 0xc8 - 1fde: f7ff ff80 bl 1ee2 + 203c: 20c8 movs r0, #200 ; 0xc8 + 203e: f7ff ff80 bl 1f42 write_command(FRMCTR1, FRMCTR1_PARA, sizeof(FRMCTR1_PARA)); - 1fe2: 2203 movs r2, #3 - 1fe4: 4930 ldr r1, [pc, #192] ; (20a8 ) - 1fe6: 20b1 movs r0, #177 ; 0xb1 - 1fe8: f7ff ffa9 bl 1f3e + 2042: 2203 movs r2, #3 + 2044: 4930 ldr r1, [pc, #192] ; (2108 ) + 2046: 20b1 movs r0, #177 ; 0xb1 + 2048: f7ff ffa9 bl 1f9e write_command(FRMCTR2, FRMCTR2_PARA, sizeof(FRMCTR2_PARA)); - 1fec: 2203 movs r2, #3 - 1fee: 492f ldr r1, [pc, #188] ; (20ac ) - 1ff0: 20b2 movs r0, #178 ; 0xb2 - 1ff2: f7ff ffa4 bl 1f3e + 204c: 2203 movs r2, #3 + 204e: 492f ldr r1, [pc, #188] ; (210c ) + 2050: 20b2 movs r0, #178 ; 0xb2 + 2052: f7ff ffa4 bl 1f9e write_command(FRMCTR3, FRMCTR3_PARA, sizeof(FRMCTR3_PARA)); - 1ff6: 2206 movs r2, #6 - 1ff8: 492d ldr r1, [pc, #180] ; (20b0 ) - 1ffa: 20b3 movs r0, #179 ; 0xb3 - 1ffc: f7ff ff9f bl 1f3e + 2056: 2206 movs r2, #6 + 2058: 492d ldr r1, [pc, #180] ; (2110 ) + 205a: 20b3 movs r0, #179 ; 0xb3 + 205c: f7ff ff9f bl 1f9e write_command(INVCTR, INVCTR_PARA, sizeof(INVCTR_PARA)); - 2000: 2201 movs r2, #1 - 2002: 492c ldr r1, [pc, #176] ; (20b4 ) - 2004: 20b4 movs r0, #180 ; 0xb4 - 2006: f7ff ff9a bl 1f3e + 2060: 2201 movs r2, #1 + 2062: 492c ldr r1, [pc, #176] ; (2114 ) + 2064: 20b4 movs r0, #180 ; 0xb4 + 2066: f7ff ff9a bl 1f9e write_command(PWCTR1, PWCTR1_PARA, sizeof(PWCTR1_PARA)); - 200a: 2203 movs r2, #3 - 200c: 492a ldr r1, [pc, #168] ; (20b8 ) - 200e: 20c0 movs r0, #192 ; 0xc0 - 2010: f7ff ff95 bl 1f3e + 206a: 2203 movs r2, #3 + 206c: 492a ldr r1, [pc, #168] ; (2118 ) + 206e: 20c0 movs r0, #192 ; 0xc0 + 2070: f7ff ff95 bl 1f9e write_command(PWCTR2, PWCTR2_PARA, sizeof(PWCTR2_PARA)); - 2014: 2201 movs r2, #1 - 2016: 4929 ldr r1, [pc, #164] ; (20bc ) - 2018: 20c1 movs r0, #193 ; 0xc1 - 201a: f7ff ff90 bl 1f3e + 2074: 2201 movs r2, #1 + 2076: 4929 ldr r1, [pc, #164] ; (211c ) + 2078: 20c1 movs r0, #193 ; 0xc1 + 207a: f7ff ff90 bl 1f9e write_command(PWCTR3, PWCTR3_PARA, sizeof(PWCTR3_PARA)); - 201e: 2202 movs r2, #2 - 2020: 4927 ldr r1, [pc, #156] ; (20c0 ) - 2022: 20c2 movs r0, #194 ; 0xc2 - 2024: f7ff ff8b bl 1f3e + 207e: 2202 movs r2, #2 + 2080: 4927 ldr r1, [pc, #156] ; (2120 ) + 2082: 20c2 movs r0, #194 ; 0xc2 + 2084: f7ff ff8b bl 1f9e write_command(PWCTR4, PWCTR4_PARA, sizeof(PWCTR4_PARA)); - 2028: 2202 movs r2, #2 - 202a: 4926 ldr r1, [pc, #152] ; (20c4 ) - 202c: 20c3 movs r0, #195 ; 0xc3 - 202e: f7ff ff86 bl 1f3e + 2088: 2202 movs r2, #2 + 208a: 4926 ldr r1, [pc, #152] ; (2124 ) + 208c: 20c3 movs r0, #195 ; 0xc3 + 208e: f7ff ff86 bl 1f9e write_command(PWCTR5, PWCTR5_PARA, sizeof(PWCTR5_PARA)); - 2032: 2202 movs r2, #2 - 2034: 4924 ldr r1, [pc, #144] ; (20c8 ) - 2036: 20c4 movs r0, #196 ; 0xc4 - 2038: f7ff ff81 bl 1f3e + 2092: 2202 movs r2, #2 + 2094: 4924 ldr r1, [pc, #144] ; (2128 ) + 2096: 20c4 movs r0, #196 ; 0xc4 + 2098: f7ff ff81 bl 1f9e write_command(VMCTR1, VMCTR1_PARA, sizeof(VMCTR1_PARA)); - 203c: 2201 movs r2, #1 - 203e: 4923 ldr r1, [pc, #140] ; (20cc ) - 2040: 20c5 movs r0, #197 ; 0xc5 - 2042: f7ff ff7c bl 1f3e + 209c: 2201 movs r2, #1 + 209e: 4923 ldr r1, [pc, #140] ; (212c ) + 20a0: 20c5 movs r0, #197 ; 0xc5 + 20a2: f7ff ff7c bl 1f9e write_command(INVON, NULL, 0); - 2046: 2200 movs r2, #0 - 2048: 4611 mov r1, r2 - 204a: 2021 movs r0, #33 ; 0x21 - 204c: f7ff ff77 bl 1f3e + 20a6: 2200 movs r2, #0 + 20a8: 4611 mov r1, r2 + 20aa: 2021 movs r0, #33 ; 0x21 + 20ac: f7ff ff77 bl 1f9e write_command(MADCTL, MADCTL1_PARA, sizeof(MADCTL1_PARA)); - 2050: 2201 movs r2, #1 - 2052: 491f ldr r1, [pc, #124] ; (20d0 ) - 2054: 2036 movs r0, #54 ; 0x36 - 2056: f7ff ff72 bl 1f3e + 20b0: 2201 movs r2, #1 + 20b2: 491f ldr r1, [pc, #124] ; (2130 ) + 20b4: 2036 movs r0, #54 ; 0x36 + 20b6: f7ff ff72 bl 1f9e write_command(COLMOD, COLMOD_PARA, sizeof(COLMOD_PARA)); - 205a: 2201 movs r2, #1 - 205c: 491d ldr r1, [pc, #116] ; (20d4 ) - 205e: 203a movs r0, #58 ; 0x3a - 2060: f7ff ff6d bl 1f3e + 20ba: 2201 movs r2, #1 + 20bc: 491d ldr r1, [pc, #116] ; (2134 ) + 20be: 203a movs r0, #58 ; 0x3a + 20c0: f7ff ff6d bl 1f9e write_command(DISPON, NULL, 0); - 2064: 2200 movs r2, #0 - 2066: 4611 mov r1, r2 - 2068: 2029 movs r0, #41 ; 0x29 - 206a: f7ff ff68 bl 1f3e + 20c4: 2200 movs r2, #0 + 20c6: 4611 mov r1, r2 + 20c8: 2029 movs r0, #41 ; 0x29 + 20ca: f7ff ff68 bl 1f9e delay_ms(200); - 206e: 20c8 movs r0, #200 ; 0xc8 - 2070: f7ff ff37 bl 1ee2 + 20ce: 20c8 movs r0, #200 ; 0xc8 + 20d0: f7ff ff37 bl 1f42 } - 2074: 2000 movs r0, #0 - 2076: bd08 pop {r3, pc} + 20d4: 2000 movs r0, #0 + 20d6: bd08 pop {r3, pc} rc = hal_gpio_init_out(DISPLAY_RST, 1); assert(rc == 0); - 2078: 2300 movs r3, #0 - 207a: 461a mov r2, r3 - 207c: 4619 mov r1, r3 - 207e: 4618 mov r0, r3 - 2080: f7ff fb44 bl 170c <__assert_func> + 20d8: 2300 movs r3, #0 + 20da: 461a mov r2, r3 + 20dc: 4619 mov r1, r3 + 20de: 4618 mov r0, r3 + 20e0: f7ff fb14 bl 170c <__assert_func> rc = hal_gpio_init_out(DISPLAY_CS, 1); assert(rc == 0); - 2084: 2300 movs r3, #0 - 2086: 461a mov r2, r3 - 2088: 4619 mov r1, r3 - 208a: 4618 mov r0, r3 - 208c: f7ff fb3e bl 170c <__assert_func> + 20e4: 2300 movs r3, #0 + 20e6: 461a mov r2, r3 + 20e8: 4619 mov r1, r3 + 20ea: 4618 mov r0, r3 + 20ec: f7ff fb0e bl 170c <__assert_func> rc = hal_gpio_init_out(DISPLAY_DC, 0); assert(rc == 0); - 2090: 2300 movs r3, #0 - 2092: 461a mov r2, r3 - 2094: 4619 mov r1, r3 - 2096: 4618 mov r0, r3 - 2098: f7ff fb38 bl 170c <__assert_func> + 20f0: 2300 movs r3, #0 + 20f2: 461a mov r2, r3 + 20f4: 4619 mov r1, r3 + 20f6: 4618 mov r0, r3 + 20f8: f7ff fb08 bl 170c <__assert_func> rc = hal_gpio_init_out(DISPLAY_HIGH, 0); assert(rc == 0); - 209c: 2300 movs r3, #0 - 209e: 461a mov r2, r3 - 20a0: 4619 mov r1, r3 - 20a2: 4618 mov r0, r3 - 20a4: f7ff fb32 bl 170c <__assert_func> - 20a8: 00005330 .word 0x00005330 - 20ac: 00005334 .word 0x00005334 - 20b0: 00005338 .word 0x00005338 - 20b4: 00005340 .word 0x00005340 - 20b8: 00005348 .word 0x00005348 - 20bc: 0000534c .word 0x0000534c - 20c0: 00005350 .word 0x00005350 - 20c4: 00005354 .word 0x00005354 - 20c8: 00005358 .word 0x00005358 - 20cc: 0000535c .word 0x0000535c - 20d0: 00005344 .word 0x00005344 - 20d4: 0000532c .word 0x0000532c - -000020d8 : + 20fc: 2300 movs r3, #0 + 20fe: 461a mov r2, r3 + 2100: 4619 mov r1, r3 + 2102: 4618 mov r0, r3 + 2104: f7ff fb02 bl 170c <__assert_func> + 2108: 000053d8 .word 0x000053d8 + 210c: 000053dc .word 0x000053dc + 2110: 000053e0 .word 0x000053e0 + 2114: 000053e8 .word 0x000053e8 + 2118: 000053f0 .word 0x000053f0 + 211c: 000053f4 .word 0x000053f4 + 2120: 000053f8 .word 0x000053f8 + 2124: 000053fc .word 0x000053fc + 2128: 00005400 .word 0x00005400 + 212c: 00005404 .word 0x00005404 + 2130: 000053ec .word 0x000053ec + 2134: 000053d4 .word 0x000053d4 + +00002138 : static int set_orientation(uint8_t orientation) { - 20d8: b500 push {lr} - 20da: b083 sub sp, #12 + 2138: b500 push {lr} + 213a: b083 sub sp, #12 uint8_t orientation_para[1] = { orientation }; - 20dc: a902 add r1, sp, #8 - 20de: f801 0d04 strb.w r0, [r1, #-4]! + 213c: a902 add r1, sp, #8 + 213e: f801 0d04 strb.w r0, [r1, #-4]! int rc = write_command(MADCTL, orientation_para, 1); - 20e2: 2201 movs r2, #1 - 20e4: 2036 movs r0, #54 ; 0x36 - 20e6: f7ff ff2a bl 1f3e + 2142: 2201 movs r2, #1 + 2144: 2036 movs r0, #54 ; 0x36 + 2146: f7ff ff2a bl 1f9e assert(rc == 0); - 20ea: b918 cbnz r0, 20f4 + 214a: b918 cbnz r0, 2154 } - 20ec: 2000 movs r0, #0 - 20ee: b003 add sp, #12 - 20f0: f85d fb04 ldr.w pc, [sp], #4 + 214c: 2000 movs r0, #0 + 214e: b003 add sp, #12 + 2150: f85d fb04 ldr.w pc, [sp], #4 assert(rc == 0); - 20f4: 2300 movs r3, #0 - 20f6: 461a mov r2, r3 - 20f8: 4619 mov r1, r3 - 20fa: 4618 mov r0, r3 - 20fc: f7ff fb06 bl 170c <__assert_func> + 2154: 2300 movs r3, #0 + 2156: 461a mov r2, r3 + 2158: 4619 mov r1, r3 + 215a: 4618 mov r0, r3 + 215c: f7ff fad6 bl 170c <__assert_func> -00002100 : +00002160 : static int set_window(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom) { - 2100: b5f0 push {r4, r5, r6, r7, lr} - 2102: b083 sub sp, #12 + 2160: b5f0 push {r4, r5, r6, r7, lr} + 2162: b083 sub sp, #12 assert(left < COL_COUNT && right < COL_COUNT && top < ROW_COUNT && bottom < ROW_COUNT); - 2104: 28ef cmp r0, #239 ; 0xef - 2106: d839 bhi.n 217c - 2108: 4604 mov r4, r0 - 210a: 460e mov r6, r1 - 210c: 4615 mov r5, r2 - 210e: 461f mov r7, r3 - 2110: 2aef cmp r2, #239 ; 0xef - 2112: d833 bhi.n 217c - 2114: 29ef cmp r1, #239 ; 0xef - 2116: d831 bhi.n 217c - 2118: 2bef cmp r3, #239 ; 0xef - 211a: d82f bhi.n 217c + 2164: 28ef cmp r0, #239 ; 0xef + 2166: d839 bhi.n 21dc + 2168: 4604 mov r4, r0 + 216a: 460e mov r6, r1 + 216c: 4615 mov r5, r2 + 216e: 461f mov r7, r3 + 2170: 2aef cmp r2, #239 ; 0xef + 2172: d833 bhi.n 21dc + 2174: 29ef cmp r1, #239 ; 0xef + 2176: d831 bhi.n 21dc + 2178: 2bef cmp r3, #239 ; 0xef + 217a: d82f bhi.n 21dc assert(left <= right); - 211c: 4290 cmp r0, r2 - 211e: d833 bhi.n 2188 + 217c: 4290 cmp r0, r2 + 217e: d833 bhi.n 21e8 assert(top <= bottom); - 2120: 4299 cmp r1, r3 - 2122: d837 bhi.n 2194 + 2180: 4299 cmp r1, r3 + 2182: d837 bhi.n 21f4 int rc = write_command(CASET, NULL, 0); assert(rc == 0); - 2124: 2200 movs r2, #0 - 2126: 4611 mov r1, r2 - 2128: 202a movs r0, #42 ; 0x2a - 212a: f7ff ff08 bl 1f3e - 212e: bbb8 cbnz r0, 21a0 + 2184: 2200 movs r2, #0 + 2186: 4611 mov r1, r2 + 2188: 202a movs r0, #42 ; 0x2a + 218a: f7ff ff08 bl 1f9e + 218e: bbb8 cbnz r0, 2200 uint8_t col_para[4] = { 0x00, left, 0x00, right }; - 2130: 2300 movs r3, #0 - 2132: f88d 3004 strb.w r3, [sp, #4] - 2136: f88d 4005 strb.w r4, [sp, #5] - 213a: f88d 3006 strb.w r3, [sp, #6] - 213e: f88d 5007 strb.w r5, [sp, #7] + 2190: 2300 movs r3, #0 + 2192: f88d 3004 strb.w r3, [sp, #4] + 2196: f88d 4005 strb.w r4, [sp, #5] + 219a: f88d 3006 strb.w r3, [sp, #6] + 219e: f88d 5007 strb.w r5, [sp, #7] rc = write_data(col_para, 4); assert(rc == 0); - 2142: 2104 movs r1, #4 - 2144: eb0d 0001 add.w r0, sp, r1 - 2148: f7ff feec bl 1f24 - 214c: bb70 cbnz r0, 21ac + 21a2: 2104 movs r1, #4 + 21a4: eb0d 0001 add.w r0, sp, r1 + 21a8: f7ff feec bl 1f84 + 21ac: bb70 cbnz r0, 220c rc = write_command(RASET, NULL, 0); assert(rc == 0); - 214e: 2200 movs r2, #0 - 2150: 4611 mov r1, r2 - 2152: 202b movs r0, #43 ; 0x2b - 2154: f7ff fef3 bl 1f3e - 2158: bb70 cbnz r0, 21b8 + 21ae: 2200 movs r2, #0 + 21b0: 4611 mov r1, r2 + 21b2: 202b movs r0, #43 ; 0x2b + 21b4: f7ff fef3 bl 1f9e + 21b8: bb70 cbnz r0, 2218 uint8_t row_para[4] = { 0x00, top, 0x00, bottom }; - 215a: 2300 movs r3, #0 - 215c: f88d 3000 strb.w r3, [sp] - 2160: f88d 6001 strb.w r6, [sp, #1] - 2164: f88d 3002 strb.w r3, [sp, #2] - 2168: f88d 7003 strb.w r7, [sp, #3] + 21ba: 2300 movs r3, #0 + 21bc: f88d 3000 strb.w r3, [sp] + 21c0: f88d 6001 strb.w r6, [sp, #1] + 21c4: f88d 3002 strb.w r3, [sp, #2] + 21c8: f88d 7003 strb.w r7, [sp, #3] rc = write_data(row_para, 4); assert(rc == 0); - 216c: 2104 movs r1, #4 - 216e: 4668 mov r0, sp - 2170: f7ff fed8 bl 1f24 - 2174: bb30 cbnz r0, 21c4 -} - 2176: 2000 movs r0, #0 - 2178: b003 add sp, #12 - 217a: bdf0 pop {r4, r5, r6, r7, pc} + 21cc: 2104 movs r1, #4 + 21ce: 4668 mov r0, sp + 21d0: f7ff fed8 bl 1f84 + 21d4: bb30 cbnz r0, 2224 +} + 21d6: 2000 movs r0, #0 + 21d8: b003 add sp, #12 + 21da: bdf0 pop {r4, r5, r6, r7, pc} assert(left < COL_COUNT && right < COL_COUNT && top < ROW_COUNT && bottom < ROW_COUNT); - 217c: 2300 movs r3, #0 - 217e: 461a mov r2, r3 - 2180: 4619 mov r1, r3 - 2182: 4618 mov r0, r3 - 2184: f7ff fac2 bl 170c <__assert_func> + 21dc: 2300 movs r3, #0 + 21de: 461a mov r2, r3 + 21e0: 4619 mov r1, r3 + 21e2: 4618 mov r0, r3 + 21e4: f7ff fa92 bl 170c <__assert_func> assert(left <= right); - 2188: 2300 movs r3, #0 - 218a: 461a mov r2, r3 - 218c: 4619 mov r1, r3 - 218e: 4618 mov r0, r3 - 2190: f7ff fabc bl 170c <__assert_func> + 21e8: 2300 movs r3, #0 + 21ea: 461a mov r2, r3 + 21ec: 4619 mov r1, r3 + 21ee: 4618 mov r0, r3 + 21f0: f7ff fa8c bl 170c <__assert_func> assert(top <= bottom); - 2194: 2300 movs r3, #0 - 2196: 461a mov r2, r3 - 2198: 4619 mov r1, r3 - 219a: 4618 mov r0, r3 - 219c: f7ff fab6 bl 170c <__assert_func> + 21f4: 2300 movs r3, #0 + 21f6: 461a mov r2, r3 + 21f8: 4619 mov r1, r3 + 21fa: 4618 mov r0, r3 + 21fc: f7ff fa86 bl 170c <__assert_func> int rc = write_command(CASET, NULL, 0); assert(rc == 0); - 21a0: 2300 movs r3, #0 - 21a2: 461a mov r2, r3 - 21a4: 4619 mov r1, r3 - 21a6: 4618 mov r0, r3 - 21a8: f7ff fab0 bl 170c <__assert_func> + 2200: 2300 movs r3, #0 + 2202: 461a mov r2, r3 + 2204: 4619 mov r1, r3 + 2206: 4618 mov r0, r3 + 2208: f7ff fa80 bl 170c <__assert_func> rc = write_data(col_para, 4); assert(rc == 0); - 21ac: 2300 movs r3, #0 - 21ae: 461a mov r2, r3 - 21b0: 4619 mov r1, r3 - 21b2: 4618 mov r0, r3 - 21b4: f7ff faaa bl 170c <__assert_func> + 220c: 2300 movs r3, #0 + 220e: 461a mov r2, r3 + 2210: 4619 mov r1, r3 + 2212: 4618 mov r0, r3 + 2214: f7ff fa7a bl 170c <__assert_func> rc = write_command(RASET, NULL, 0); assert(rc == 0); - 21b8: 2300 movs r3, #0 - 21ba: 461a mov r2, r3 - 21bc: 4619 mov r1, r3 - 21be: 4618 mov r0, r3 - 21c0: f7ff faa4 bl 170c <__assert_func> + 2218: 2300 movs r3, #0 + 221a: 461a mov r2, r3 + 221c: 4619 mov r1, r3 + 221e: 4618 mov r0, r3 + 2220: f7ff fa74 bl 170c <__assert_func> rc = write_data(row_para, 4); assert(rc == 0); - 21c4: 2300 movs r3, #0 - 21c6: 461a mov r2, r3 - 21c8: 4619 mov r1, r3 - 21ca: 4618 mov r0, r3 - 21cc: f7ff fa9e bl 170c <__assert_func> + 2224: 2300 movs r3, #0 + 2226: 461a mov r2, r3 + 2228: 4619 mov r1, r3 + 222a: 4618 mov r0, r3 + 222c: f7ff fa6e bl 170c <__assert_func> -000021d0 : +00002230 : int pinetime_boot_display_image(void) { - 21d0: b5f8 push {r3, r4, r5, r6, r7, lr} + 2230: b5f8 push {r3, r4, r5, r6, r7, lr} console_printf("Displaying image...\n"); console_flush(); - 21d2: 4835 ldr r0, [pc, #212] ; (22a8 ) - 21d4: f000 f89e bl 2314 - 21d8: f000 f8f2 bl 23c0 + 2232: 4835 ldr r0, [pc, #212] ; (2308 ) + 2234: f000 f89e bl 2374 + 2238: f000 f8f2 bl 2420 int rc = init_display(); assert(rc == 0); - 21dc: f7ff fed6 bl 1f8c - 21e0: b928 cbnz r0, 21ee + 223c: f7ff fed6 bl 1fec + 2240: b928 cbnz r0, 224e rc = set_orientation(Landscape); assert(rc == 0); - 21e2: 2060 movs r0, #96 ; 0x60 - 21e4: f7ff ff78 bl 20d8 - 21e8: b938 cbnz r0, 21fa + 2242: 2060 movs r0, #96 ; 0x60 + 2244: f7ff ff78 bl 2138 + 2248: b938 cbnz r0, 225a for (uint8_t row = 0; row < ROW_COUNT; row++) { - 21ea: 2600 movs r6, #0 - 21ec: e051 b.n 2292 + 224a: 2600 movs r6, #0 + 224c: e051 b.n 22f2 int rc = init_display(); assert(rc == 0); - 21ee: 2300 movs r3, #0 - 21f0: 461a mov r2, r3 - 21f2: 4619 mov r1, r3 - 21f4: 4618 mov r0, r3 - 21f6: f7ff fa89 bl 170c <__assert_func> + 224e: 2300 movs r3, #0 + 2250: 461a mov r2, r3 + 2252: 4619 mov r1, r3 + 2254: 4618 mov r0, r3 + 2256: f7ff fa59 bl 170c <__assert_func> rc = set_orientation(Landscape); assert(rc == 0); - 21fa: 2300 movs r3, #0 - 21fc: 461a mov r2, r3 - 21fe: 4619 mov r1, r3 - 2200: 4618 mov r0, r3 - 2202: f7ff fa83 bl 170c <__assert_func> + 225a: 2300 movs r3, #0 + 225c: 461a mov r2, r3 + 225e: 4619 mov r1, r3 + 2260: 4618 mov r0, r3 + 2262: f7ff fa53 bl 170c <__assert_func> uint16_t len = (right - left + 1) * BYTES_PER_PIXEL; - 2206: 1be5 subs r5, r4, r7 - 2208: 3501 adds r5, #1 - 220a: 006d lsls r5, r5, #1 - 220c: b2ad uxth r5, r5 + 2266: 1be5 subs r5, r4, r7 + 2268: 3501 adds r5, #1 + 226a: 006d lsls r5, r5, #1 + 226c: b2ad uxth r5, r5 uint32_t offset = ((top * COL_COUNT) + left) * BYTES_PER_PIXEL; - 220e: ebc6 1306 rsb r3, r6, r6, lsl #4 - 2212: 0119 lsls r1, r3, #4 - 2214: 4439 add r1, r7 + 226e: ebc6 1306 rsb r3, r6, r6, lsl #4 + 2272: 0119 lsls r1, r3, #4 + 2274: 4439 add r1, r7 int rc = hal_flash_read(FLASH_DEVICE, offset, flash_buffer, len); assert(rc == 0); - 2216: 462b mov r3, r5 - 2218: 4a24 ldr r2, [pc, #144] ; (22ac ) - 221a: 0049 lsls r1, r1, #1 - 221c: 2001 movs r0, #1 - 221e: f001 ff56 bl 40ce - 2222: b9e0 cbnz r0, 225e + 2276: 462b mov r3, r5 + 2278: 4a24 ldr r2, [pc, #144] ; (230c ) + 227a: 0049 lsls r1, r1, #1 + 227c: 2001 movs r0, #1 + 227e: f001 ff56 bl 412e + 2282: b9e0 cbnz r0, 22be rc = set_window(left, top, right, bottom); assert(rc == 0); - 2224: b2e4 uxtb r4, r4 - 2226: 4633 mov r3, r6 - 2228: 4622 mov r2, r4 - 222a: 4631 mov r1, r6 - 222c: 4638 mov r0, r7 - 222e: f7ff ff67 bl 2100 - 2232: b9d0 cbnz r0, 226a + 2284: b2e4 uxtb r4, r4 + 2286: 4633 mov r3, r6 + 2288: 4622 mov r2, r4 + 228a: 4631 mov r1, r6 + 228c: 4638 mov r0, r7 + 228e: f7ff ff67 bl 2160 + 2292: b9d0 cbnz r0, 22ca rc = write_command(RAMWR, NULL, 0); assert(rc == 0); - 2234: 2200 movs r2, #0 - 2236: 4611 mov r1, r2 - 2238: 202c movs r0, #44 ; 0x2c - 223a: f7ff fe80 bl 1f3e - 223e: b9d0 cbnz r0, 2276 + 2294: 2200 movs r2, #0 + 2296: 4611 mov r1, r2 + 2298: 202c movs r0, #44 ; 0x2c + 229a: f7ff fe80 bl 1f9e + 229e: b9d0 cbnz r0, 22d6 rc = write_data(flash_buffer, len); assert(rc == 0); - 2240: 4629 mov r1, r5 - 2242: 481a ldr r0, [pc, #104] ; (22ac ) - 2244: f7ff fe6e bl 1f24 - 2248: b9d8 cbnz r0, 2282 + 22a0: 4629 mov r1, r5 + 22a2: 481a ldr r0, [pc, #104] ; (230c ) + 22a4: f7ff fe6e bl 1f84 + 22a8: b9d8 cbnz r0, 22e2 left = right + 1; - 224a: 3401 adds r4, #1 - 224c: b2e7 uxtb r7, r4 + 22aa: 3401 adds r4, #1 + 22ac: b2e7 uxtb r7, r4 if (left >= COL_COUNT) { break; } - 224e: 2fef cmp r7, #239 ; 0xef - 2250: d81d bhi.n 228e + 22ae: 2fef cmp r7, #239 ; 0xef + 22b0: d81d bhi.n 22ee uint16_t right = left + batch_columns - 1; - 2252: f107 047f add.w r4, r7, #127 ; 0x7f + 22b2: f107 047f add.w r4, r7, #127 ; 0x7f if (right >= COL_COUNT) { right = COL_COUNT - 1; } - 2256: 2cef cmp r4, #239 ; 0xef - 2258: d9d5 bls.n 2206 - 225a: 24ef movs r4, #239 ; 0xef - 225c: e7d3 b.n 2206 + 22b6: 2cef cmp r4, #239 ; 0xef + 22b8: d9d5 bls.n 2266 + 22ba: 24ef movs r4, #239 ; 0xef + 22bc: e7d3 b.n 2266 int rc = hal_flash_read(FLASH_DEVICE, offset, flash_buffer, len); assert(rc == 0); - 225e: 2300 movs r3, #0 - 2260: 461a mov r2, r3 - 2262: 4619 mov r1, r3 - 2264: 4618 mov r0, r3 - 2266: f7ff fa51 bl 170c <__assert_func> + 22be: 2300 movs r3, #0 + 22c0: 461a mov r2, r3 + 22c2: 4619 mov r1, r3 + 22c4: 4618 mov r0, r3 + 22c6: f7ff fa21 bl 170c <__assert_func> rc = set_window(left, top, right, bottom); assert(rc == 0); - 226a: 2300 movs r3, #0 - 226c: 461a mov r2, r3 - 226e: 4619 mov r1, r3 - 2270: 4618 mov r0, r3 - 2272: f7ff fa4b bl 170c <__assert_func> + 22ca: 2300 movs r3, #0 + 22cc: 461a mov r2, r3 + 22ce: 4619 mov r1, r3 + 22d0: 4618 mov r0, r3 + 22d2: f7ff fa1b bl 170c <__assert_func> rc = write_command(RAMWR, NULL, 0); assert(rc == 0); - 2276: 2300 movs r3, #0 - 2278: 461a mov r2, r3 - 227a: 4619 mov r1, r3 - 227c: 4618 mov r0, r3 - 227e: f7ff fa45 bl 170c <__assert_func> + 22d6: 2300 movs r3, #0 + 22d8: 461a mov r2, r3 + 22da: 4619 mov r1, r3 + 22dc: 4618 mov r0, r3 + 22de: f7ff fa15 bl 170c <__assert_func> rc = write_data(flash_buffer, len); assert(rc == 0); - 2282: 2300 movs r3, #0 - 2284: 461a mov r2, r3 - 2286: 4619 mov r1, r3 - 2288: 4618 mov r0, r3 - 228a: f7ff fa3f bl 170c <__assert_func> + 22e2: 2300 movs r3, #0 + 22e4: 461a mov r2, r3 + 22e6: 4619 mov r1, r3 + 22e8: 4618 mov r0, r3 + 22ea: f7ff fa0f bl 170c <__assert_func> for (uint8_t row = 0; row < ROW_COUNT; row++) { - 228e: 3601 adds r6, #1 - 2290: b2f6 uxtb r6, r6 - 2292: 2eef cmp r6, #239 ; 0xef - 2294: d801 bhi.n 229a + 22ee: 3601 adds r6, #1 + 22f0: b2f6 uxtb r6, r6 + 22f2: 2eef cmp r6, #239 ; 0xef + 22f4: d801 bhi.n 22fa uint8_t left = 0; - 2296: 2700 movs r7, #0 - 2298: e7d9 b.n 224e + 22f6: 2700 movs r7, #0 + 22f8: e7d9 b.n 22ae console_printf("Image displayed\n"); console_flush(); - 229a: 4805 ldr r0, [pc, #20] ; (22b0 ) - 229c: f000 f83a bl 2314 - 22a0: f000 f88e bl 23c0 + 22fa: 4805 ldr r0, [pc, #20] ; (2310 ) + 22fc: f000 f83a bl 2374 + 2300: f000 f88e bl 2420 } - 22a4: 2000 movs r0, #0 - 22a6: bdf8 pop {r3, r4, r5, r6, r7, pc} - 22a8: 00005360 .word 0x00005360 - 22ac: 20004a90 .word 0x20004a90 - 22b0: 00005378 .word 0x00005378 + 2304: 2000 movs r0, #0 + 2306: bdf8 pop {r3, r4, r5, r6, r7, pc} + 2308: 00005408 .word 0x00005408 + 230c: 20004a90 .word 0x20004a90 + 2310: 00005420 .word 0x00005420 -000022b4 : +00002314 : int console_unlock(void) { return OS_OK; } int console_out(int c) { return console_out_nolock(c); } void console_write(const char *str, int cnt) { - 22b4: b570 push {r4, r5, r6, lr} - 22b6: 4606 mov r6, r0 - 22b8: 460d mov r5, r1 + 2314: b570 push {r4, r5, r6, lr} + 2316: 4606 mov r6, r0 + 2318: 460d mov r5, r1 int i; for (i = 0; i < cnt; i++) { - 22ba: 2400 movs r4, #0 - 22bc: 42ac cmp r4, r5 - 22be: da07 bge.n 22d0 + 231a: 2400 movs r4, #0 + 231c: 42ac cmp r4, r5 + 231e: da07 bge.n 2330 if (console_out_nolock((int)str[i]) == EOF) { break; } - 22c0: 5d30 ldrb r0, [r6, r4] - 22c2: f000 f8dd bl 2480 - 22c6: f1b0 3fff cmp.w r0, #4294967295 ; 0xffffffff - 22ca: d001 beq.n 22d0 + 2320: 5d30 ldrb r0, [r6, r4] + 2322: f000 f8dd bl 24e0 + 2326: f1b0 3fff cmp.w r0, #4294967295 ; 0xffffffff + 232a: d001 beq.n 2330 for (i = 0; i < cnt; i++) { - 22cc: 3401 adds r4, #1 - 22ce: e7f5 b.n 22bc + 232c: 3401 adds r4, #1 + 232e: e7f5 b.n 231c } } - 22d0: bd70 pop {r4, r5, r6, pc} + 2330: bd70 pop {r4, r5, r6, pc} -000022d2 : +00002332 : void console_blocking_mode(void) { - 22d2: b508 push {r3, lr} + 2332: b508 push {r3, lr} disable_buffer(); - 22d4: f000 f898 bl 2408 + 2334: f000 f898 bl 2468 } - 22d8: bd08 pop {r3, pc} + 2338: bd08 pop {r3, pc} ... -000022dc : +0000233c : void console_deinit(void) {} void console_reinit(void) {} void console_pkg_init(void) { - 22dc: b510 push {r4, lr} - 22de: b082 sub sp, #8 + 233c: b510 push {r4, lr} + 233e: b082 sub sp, #8 int rc = 0; /* Ensure this function only gets called by sysinit. */ SYSINIT_ASSERT_ACTIVE(); os_eventq_init(&avail_queue); - 22e0: 4809 ldr r0, [pc, #36] ; (2308 ) - 22e2: f7ff fae8 bl 18b6 + 2340: 4809 ldr r0, [pc, #36] ; (2368 ) + 2342: f7ff fab8 bl 18b6 os_mutex_init(&console_write_lock); - 22e6: 4809 ldr r0, [pc, #36] ; (230c ) - 22e8: f7ff fd39 bl 1d5e + 2346: 4809 ldr r0, [pc, #36] ; (236c ) + 2348: f7ff fd09 bl 1d5e #if MYNEWT_VAL(CONSOLE_SEMIHOSTING) rc = semihosting_console_init(); - 22ec: f000 f8e6 bl 24bc + 234c: f000 f8e6 bl 251c #endif SYSINIT_PANIC_ASSERT(rc == 0); - 22f0: b138 cbz r0, 2302 - 22f2: 2000 movs r0, #0 - 22f4: 9000 str r0, [sp, #0] - 22f6: 4b06 ldr r3, [pc, #24] ; (2310 ) - 22f8: 681c ldr r4, [r3, #0] - 22fa: 4603 mov r3, r0 - 22fc: 4602 mov r2, r0 - 22fe: 4601 mov r1, r0 - 2300: 47a0 blx r4 -} - 2302: b002 add sp, #8 - 2304: bd10 pop {r4, pc} - 2306: bf00 nop - 2308: 20004b90 .word 0x20004b90 - 230c: 20004ba0 .word 0x20004ba0 - 2310: 2000014c .word 0x2000014c - -00002314 : + 2350: b138 cbz r0, 2362 + 2352: 2000 movs r0, #0 + 2354: 9000 str r0, [sp, #0] + 2356: 4b06 ldr r3, [pc, #24] ; (2370 ) + 2358: 681c ldr r4, [r3, #0] + 235a: 4603 mov r3, r0 + 235c: 4602 mov r2, r0 + 235e: 4601 mov r1, r0 + 2360: 47a0 blx r4 +} + 2362: b002 add sp, #8 + 2364: bd10 pop {r4, pc} + 2366: bf00 nop + 2368: 20004b90 .word 0x20004b90 + 236c: 20004ba0 .word 0x20004ba0 + 2370: 2000014c .word 0x2000014c + +00002374 : * unlimited. This return value is analogous * to that of snprintf. */ int console_printf(const char *fmt, ...) { - 2314: b40f push {r0, r1, r2, r3} - 2316: b510 push {r4, lr} - 2318: b082 sub sp, #8 + 2374: b40f push {r0, r1, r2, r3} + 2376: b510 push {r4, lr} + 2378: b082 sub sp, #8 va_list args; int num_chars; num_chars = 0; if (console_get_ticks()) { - 231a: f000 f8d1 bl 24c0 - 231e: b160 cbz r0, 233a + 237a: f000 f8d1 bl 2520 + 237e: b160 cbz r0, 239a /* Prefix each line with a timestamp. */ if (!console_is_midline) { - 2320: 4b0c ldr r3, [pc, #48] ; (2354 ) - 2322: 681b ldr r3, [r3, #0] - 2324: b10b cbz r3, 232a + 2380: 4b0c ldr r3, [pc, #48] ; (23b4 ) + 2382: 681b ldr r3, [r3, #0] + 2384: b10b cbz r3, 238a num_chars = 0; - 2326: 2400 movs r4, #0 - 2328: e008 b.n 233c + 2386: 2400 movs r4, #0 + 2388: e008 b.n 239c num_chars += printf("%06lu ", (unsigned long)os_time_get()); - 232a: f7ff fbf3 bl 1b14 - 232e: 4601 mov r1, r0 - 2330: 4809 ldr r0, [pc, #36] ; (2358 ) - 2332: f002 facd bl 48d0 - 2336: 4604 mov r4, r0 - 2338: e000 b.n 233c + 238a: f7ff fbc3 bl 1b14 + 238e: 4601 mov r1, r0 + 2390: 4809 ldr r0, [pc, #36] ; (23b8 ) + 2392: f002 facd bl 4930 + 2396: 4604 mov r4, r0 + 2398: e000 b.n 239c num_chars = 0; - 233a: 2400 movs r4, #0 + 239a: 2400 movs r4, #0 } } va_start(args, fmt); - 233c: a905 add r1, sp, #20 - 233e: 9101 str r1, [sp, #4] + 239c: a905 add r1, sp, #20 + 239e: 9101 str r1, [sp, #4] num_chars += vprintf(fmt, args); - 2340: 9804 ldr r0, [sp, #16] - 2342: f002 fad7 bl 48f4 + 23a0: 9804 ldr r0, [sp, #16] + 23a2: f002 fad7 bl 4954 va_end(args); return num_chars; } - 2346: 4420 add r0, r4 - 2348: b002 add sp, #8 - 234a: e8bd 4010 ldmia.w sp!, {r4, lr} - 234e: b004 add sp, #16 - 2350: 4770 bx lr - 2352: bf00 nop - 2354: 20006414 .word 0x20006414 - 2358: 0000538c .word 0x0000538c + 23a6: 4420 add r0, r4 + 23a8: b002 add sp, #8 + 23aa: e8bd 4010 ldmia.w sp!, {r4, lr} + 23ae: b004 add sp, #16 + 23b0: 4770 bx lr + 23b2: bf00 nop + 23b4: 20006414 .word 0x20006414 + 23b8: 00005434 .word 0x00005434 -0000235c <__semihost>: +000023bc <__semihost>: // openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/debug.ocd // Warning: This code will trigger a breakpoint and hang unless a debugger is connected. // That's how ARM Semihosting sends a command to the debugger to print a message. // This code MUST be disabled on production devices. if (!log_enabled) return -1; - 235c: 4b07 ldr r3, [pc, #28] ; (237c <__semihost+0x20>) - 235e: 781b ldrb r3, [r3, #0] - 2360: b143 cbz r3, 2374 <__semihost+0x18> + 23bc: 4b07 ldr r3, [pc, #28] ; (23dc <__semihost+0x20>) + 23be: 781b ldrb r3, [r3, #0] + 23c0: b143 cbz r3, 23d4 <__semihost+0x18> static int __semihost(int command, void* message) { - 2362: b410 push {r4} - 2364: 4602 mov r2, r0 - 2366: 460c mov r4, r1 + 23c2: b410 push {r4} + 23c4: 4602 mov r2, r0 + 23c6: 460c mov r4, r1 __asm( - 2368: 4610 mov r0, r2 - 236a: 4621 mov r1, r4 - 236c: beab bkpt 0x00ab + 23c8: 4610 mov r0, r2 + 23ca: 4621 mov r1, r4 + 23cc: beab bkpt 0x00ab [cmd] "r" (command), [msg] "r" (message) : // Clobbered register list: "r0", "r1", "memory" ); return 0; // TODO - 236e: 2000 movs r0, #0 + 23ce: 2000 movs r0, #0 } - 2370: bc10 pop {r4} - 2372: 4770 bx lr + 23d0: bc10 pop {r4} + 23d2: 4770 bx lr if (!log_enabled) return -1; - 2374: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 23d4: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff } - 2378: 4770 bx lr - 237a: bf00 nop - 237c: 20000148 .word 0x20000148 + 23d8: 4770 bx lr + 23da: bf00 nop + 23dc: 20000148 .word 0x20000148 -00002380 : +000023e0 : // #define SYS_RENAME (0xf) // #define SYS_EXIT (0x18) static int debugger_connected(void) { // Return non-zero if debugger is connected. From repos/apache-mynewt-core/hw/mcu/ambiq/apollo2/src/hal_system.c return CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk; - 2380: 4b02 ldr r3, [pc, #8] ; (238c ) - 2382: 6818 ldr r0, [r3, #0] + 23e0: 4b02 ldr r3, [pc, #8] ; (23ec ) + 23e2: 6818 ldr r0, [r3, #0] } - 2384: f000 0001 and.w r0, r0, #1 - 2388: 4770 bx lr - 238a: bf00 nop - 238c: e000edf0 .word 0xe000edf0 + 23e4: f000 0001 and.w r0, r0, #1 + 23e8: 4770 bx lr + 23ea: bf00 nop + 23ec: e000edf0 .word 0xe000edf0 -00002390 : +000023f0 : #endif // !DISABLE_SEMIHOSTING // We normally set the file handle to 2 to write to the debugger's stderr output. #define SEMIHOST_HANDLE 2 static int semihost_write(uint32_t fh, const unsigned char *buffer, unsigned int length) { - 2390: b570 push {r4, r5, r6, lr} - 2392: b084 sub sp, #16 - 2394: 4606 mov r6, r0 - 2396: 460d mov r5, r1 - 2398: 4614 mov r4, r2 + 23f0: b570 push {r4, r5, r6, lr} + 23f2: b084 sub sp, #16 + 23f4: 4606 mov r6, r0 + 23f6: 460d mov r5, r1 + 23f8: 4614 mov r4, r2 // Write "length" number of bytes from "buffer" to the debugger's file handle fh. // We normally set fh=2 to write to the debugger's stderr output. #ifdef DISABLE_SEMIHOSTING // If Arm Semihosting is disabled... return 0; // Don't write debug messages. #else // If Arm Semihosting is enabled... if (!debugger_connected()) { return 0; } // If debugger is not connected, quit. - 239a: f7ff fff1 bl 2380 - 239e: 4603 mov r3, r0 - 23a0: b108 cbz r0, 23a6 + 23fa: f7ff fff1 bl 23e0 + 23fe: 4603 mov r3, r0 + 2400: b108 cbz r0, 2406 if (length == 0) { return 0; } - 23a2: b91c cbnz r4, 23ac - 23a4: 2300 movs r3, #0 + 2402: b91c cbnz r4, 240c + 2404: 2300 movs r3, #0 args[0] = (uint32_t)fh; args[1] = (uint32_t)buffer; args[2] = (uint32_t)length; return __semihost(SYS_WRITE, args); #endif // DISABLE_SEMIHOSTING } - 23a6: 4618 mov r0, r3 - 23a8: b004 add sp, #16 - 23aa: bd70 pop {r4, r5, r6, pc} + 2406: 4618 mov r0, r3 + 2408: b004 add sp, #16 + 240a: bd70 pop {r4, r5, r6, pc} args[0] = (uint32_t)fh; - 23ac: 9601 str r6, [sp, #4] + 240c: 9601 str r6, [sp, #4] args[1] = (uint32_t)buffer; - 23ae: 9502 str r5, [sp, #8] + 240e: 9502 str r5, [sp, #8] args[2] = (uint32_t)length; - 23b0: 9403 str r4, [sp, #12] + 2410: 9403 str r4, [sp, #12] return __semihost(SYS_WRITE, args); - 23b2: a901 add r1, sp, #4 - 23b4: 2005 movs r0, #5 - 23b6: f7ff ffd1 bl 235c <__semihost> - 23ba: 4603 mov r3, r0 - 23bc: e7f3 b.n 23a6 + 2412: a901 add r1, sp, #4 + 2414: 2005 movs r0, #5 + 2416: f7ff ffd1 bl 23bc <__semihost> + 241a: 4603 mov r3, r0 + 241c: e7f3 b.n 2406 ... -000023c0 : +00002420 : static struct os_mbuf *semihost_mbuf = NULL; void console_flush(void) { - 23c0: b538 push {r3, r4, r5, lr} + 2420: b538 push {r3, r4, r5, lr} // Flush output buffer to the console log. This will be slow. if (!log_enabled) { return; } // Skip if log not enabled. - 23c2: 4b0e ldr r3, [pc, #56] ; (23fc ) - 23c4: 781b ldrb r3, [r3, #0] - 23c6: b1bb cbz r3, 23f8 + 2422: 4b0e ldr r3, [pc, #56] ; (245c ) + 2424: 781b ldrb r3, [r3, #0] + 2426: b1bb cbz r3, 2458 if (!semihost_mbuf) { return; } // Buffer is empty, nothing to write. - 23c8: 4b0d ldr r3, [pc, #52] ; (2400 ) - 23ca: 681d ldr r5, [r3, #0] - 23cc: b1a5 cbz r5, 23f8 + 2428: 4b0d ldr r3, [pc, #52] ; (2460 ) + 242a: 681d ldr r5, [r3, #0] + 242c: b1a5 cbz r5, 2458 #endif static inline int os_arch_in_isr(void) { return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0; - 23ce: 4b0d ldr r3, [pc, #52] ; (2404 ) - 23d0: 685b ldr r3, [r3, #4] - 23d2: f3c3 0308 ubfx r3, r3, #0, #9 + 242e: 4b0d ldr r3, [pc, #52] ; (2464 ) + 2430: 685b ldr r3, [r3, #4] + 2432: f3c3 0308 ubfx r3, r3, #0, #9 if (os_arch_in_isr()) { return; } // Don't flush if we are called during an interrupt. - 23d6: b97b cbnz r3, 23f8 + 2436: b97b cbnz r3, 2458 // Swap mbufs first to prevent concurrency problems. struct os_mbuf *old = semihost_mbuf; semihost_mbuf = NULL; - 23d8: 4b09 ldr r3, [pc, #36] ; (2400 ) - 23da: 2200 movs r2, #0 - 23dc: 601a str r2, [r3, #0] + 2438: 4b09 ldr r3, [pc, #36] ; (2460 ) + 243a: 2200 movs r2, #0 + 243c: 601a str r2, [r3, #0] struct os_mbuf *m = old; - 23de: 462c mov r4, r5 + 243e: 462c mov r4, r5 while (m) { // For each mbuf in the chain... - 23e0: e005 b.n 23ee + 2440: e005 b.n 244e const unsigned char *data = OS_MBUF_DATA(m, const unsigned char *); // Fetch the data. int size = m->om_len; // Fetch the size. semihost_write(SEMIHOST_HANDLE, data, size); // Write the data to Semihosting output. - 23e2: 88e2 ldrh r2, [r4, #6] - 23e4: 6821 ldr r1, [r4, #0] - 23e6: 2002 movs r0, #2 - 23e8: f7ff ffd2 bl 2390 + 2442: 88e2 ldrh r2, [r4, #6] + 2444: 6821 ldr r1, [r4, #0] + 2446: 2002 movs r0, #2 + 2448: f7ff ffd2 bl 23f0 m = m->om_next.sle_next; // Fetch next mbuf in the chain. - 23ec: 68e4 ldr r4, [r4, #12] + 244c: 68e4 ldr r4, [r4, #12] while (m) { // For each mbuf in the chain... - 23ee: 2c00 cmp r4, #0 - 23f0: d1f7 bne.n 23e2 + 244e: 2c00 cmp r4, #0 + 2450: d1f7 bne.n 2442 } if (old) { os_mbuf_free_chain(old); } // Deallocate the old chain. - 23f2: 4628 mov r0, r5 - 23f4: f7ff fc43 bl 1c7e + 2452: 4628 mov r0, r5 + 2454: f7ff fc13 bl 1c7e } - 23f8: bd38 pop {r3, r4, r5, pc} - 23fa: bf00 nop - 23fc: 20000148 .word 0x20000148 - 2400: 20004bac .word 0x20004bac - 2404: e000ed00 .word 0xe000ed00 + 2458: bd38 pop {r3, r4, r5, pc} + 245a: bf00 nop + 245c: 20000148 .word 0x20000148 + 2460: 20004bac .word 0x20004bac + 2464: e000ed00 .word 0xe000ed00 -00002408 : +00002468 : void disable_buffer(void) { buffer_enabled = false; console_flush(); } // Disable buffering. - 2408: b508 push {r3, lr} - 240a: f7ff ffd9 bl 23c0 - 240e: bd08 pop {r3, pc} + 2468: b508 push {r3, lr} + 246a: f7ff ffd9 bl 2420 + 246e: bd08 pop {r3, pc} -00002410 : +00002470 : void console_buffer(const char *buffer, unsigned int length) { - 2410: b538 push {r3, r4, r5, lr} + 2470: b538 push {r3, r4, r5, lr} // Append "length" number of bytes from "buffer" to the output buffer. #ifdef DISABLE_SEMIHOSTING // If Arm Semihosting is disabled... return; // Don't write debug messages. #else // If Arm Semihosting is enabled... int rc; if (!log_enabled) { return; } // Skip if log not enabled. - 2412: 4b12 ldr r3, [pc, #72] ; (245c ) - 2414: 781b ldrb r3, [r3, #0] - 2416: b903 cbnz r3, 241a + 2472: 4b12 ldr r3, [pc, #72] ; (24bc ) + 2474: 781b ldrb r3, [r3, #0] + 2476: b903 cbnz r3, 247a if (os_mbuf_len(semihost_mbuf) + length >= OUTPUT_BUFFER_SIZE) { return; } // Append the data to the mbuf chain. This may increase the numbere of mbufs in the chain. rc = os_mbuf_append(semihost_mbuf, buffer, length); if (rc) { return; } // If out of memory, quit. #endif // DISABLE_SEMIHOSTING } - 2418: bd38 pop {r3, r4, r5, pc} - 241a: 460d mov r5, r1 - 241c: 4604 mov r4, r0 + 2478: bd38 pop {r3, r4, r5, pc} + 247a: 460d mov r5, r1 + 247c: 4604 mov r4, r0 if (!debugger_connected()) { return; } // If debugger is not connected, quit. - 241e: f7ff ffaf bl 2380 - 2422: 2800 cmp r0, #0 - 2424: d0f8 beq.n 2418 + 247e: f7ff ffaf bl 23e0 + 2482: 2800 cmp r0, #0 + 2484: d0f8 beq.n 2478 if (!semihost_mbuf) { // Allocate mbuf if not already allocated. - 2426: 4b0e ldr r3, [pc, #56] ; (2460 ) - 2428: 681b ldr r3, [r3, #0] - 242a: b173 cbz r3, 244a + 2486: 4b0e ldr r3, [pc, #56] ; (24c0 ) + 2488: 681b ldr r3, [r3, #0] + 248a: b173 cbz r3, 24aa if (os_mbuf_len(semihost_mbuf) + length >= OUTPUT_BUFFER_SIZE) { return; } - 242c: 4b0c ldr r3, [pc, #48] ; (2460 ) - 242e: 6818 ldr r0, [r3, #0] - 2430: f7ff fc37 bl 1ca2 - 2434: 4428 add r0, r5 - 2436: f5b0 6f00 cmp.w r0, #2048 ; 0x800 - 243a: d2ed bcs.n 2418 + 248c: 4b0c ldr r3, [pc, #48] ; (24c0 ) + 248e: 6818 ldr r0, [r3, #0] + 2490: f7ff fc07 bl 1ca2 + 2494: 4428 add r0, r5 + 2496: f5b0 6f00 cmp.w r0, #2048 ; 0x800 + 249a: d2ed bcs.n 2478 rc = os_mbuf_append(semihost_mbuf, buffer, length); - 243c: b2aa uxth r2, r5 - 243e: 4621 mov r1, r4 - 2440: 4b07 ldr r3, [pc, #28] ; (2460 ) - 2442: 6818 ldr r0, [r3, #0] - 2444: f7ff fc37 bl 1cb6 - 2448: e7e6 b.n 2418 + 249c: b2aa uxth r2, r5 + 249e: 4621 mov r1, r4 + 24a0: 4b07 ldr r3, [pc, #28] ; (24c0 ) + 24a2: 6818 ldr r0, [r3, #0] + 24a4: f7ff fc07 bl 1cb6 + 24a8: e7e6 b.n 2478 semihost_mbuf = os_msys_get_pkthdr(length, 0); - 244a: 2100 movs r1, #0 - 244c: b2a8 uxth r0, r5 - 244e: f7ff fb33 bl 1ab8 - 2452: 4b03 ldr r3, [pc, #12] ; (2460 ) - 2454: 6018 str r0, [r3, #0] + 24aa: 2100 movs r1, #0 + 24ac: b2a8 uxth r0, r5 + 24ae: f7ff fb03 bl 1ab8 + 24b2: 4b03 ldr r3, [pc, #12] ; (24c0 ) + 24b4: 6018 str r0, [r3, #0] if (!semihost_mbuf) { return; } // If out of memory, quit. - 2456: 2800 cmp r0, #0 - 2458: d1e8 bne.n 242c - 245a: e7dd b.n 2418 - 245c: 20000148 .word 0x20000148 - 2460: 20004bac .word 0x20004bac + 24b6: 2800 cmp r0, #0 + 24b8: d1e8 bne.n 248c + 24ba: e7dd b.n 2478 + 24bc: 20000148 .word 0x20000148 + 24c0: 20004bac .word 0x20004bac -00002464 : +000024c4 : float f_abs = *neg ? -f : f; // Absolute value of f *i = (int) f_abs; // Integer part *d = ((int) (1000000.0f * f_abs)) % 1000000; // 6 decimal places } static void semihosting_console_write_ch(char c) { - 2464: b500 push {lr} - 2466: b083 sub sp, #12 - 2468: f88d 0007 strb.w r0, [sp, #7] + 24c4: b500 push {lr} + 24c6: b083 sub sp, #12 + 24c8: f88d 0007 strb.w r0, [sp, #7] if (c == '\r') { return; } // Don't display \r. - 246c: 280d cmp r0, #13 - 246e: d004 beq.n 247a + 24cc: 280d cmp r0, #13 + 24ce: d004 beq.n 24da console_buffer(&c, 1); // Append the char to the output buffer. - 2470: 2101 movs r1, #1 - 2472: f10d 0007 add.w r0, sp, #7 - 2476: f7ff ffcb bl 2410 + 24d0: 2101 movs r1, #1 + 24d2: f10d 0007 add.w r0, sp, #7 + 24d6: f7ff ffcb bl 2470 // if (c == '\n') { console_flush(); } // If we see a newline, flush the buffer. } - 247a: b003 add sp, #12 - 247c: f85d fb04 ldr.w pc, [sp], #4 + 24da: b003 add sp, #12 + 24dc: f85d fb04 ldr.w pc, [sp], #4 -00002480 : +000024e0 : int console_out_nolock(int character) { - 2480: b538 push {r3, r4, r5, lr} + 24e0: b538 push {r3, r4, r5, lr} char c = (char)character; - 2482: b2c5 uxtb r5, r0 + 24e2: b2c5 uxtb r5, r0 if (g_silence_console) { return c; } - 2484: 4b0b ldr r3, [pc, #44] ; (24b4 ) - 2486: 781b ldrb r3, [r3, #0] - 2488: b953 cbnz r3, 24a0 - 248a: 4604 mov r4, r0 + 24e4: 4b0b ldr r3, [pc, #44] ; (2514 ) + 24e6: 781b ldrb r3, [r3, #0] + 24e8: b953 cbnz r3, 2500 + 24ea: 4604 mov r4, r0 if ('\n' == c) { - 248c: 2d0a cmp r5, #10 - 248e: d009 beq.n 24a4 + 24ec: 2d0a cmp r5, #10 + 24ee: d009 beq.n 2504 semihosting_console_write_ch('\r'); console_is_midline = 0; } else { console_is_midline = 1; - 2490: 4b09 ldr r3, [pc, #36] ; (24b8 ) - 2492: 2201 movs r2, #1 - 2494: 601a str r2, [r3, #0] + 24f0: 4b09 ldr r3, [pc, #36] ; (2518 ) + 24f2: 2201 movs r2, #1 + 24f4: 601a str r2, [r3, #0] } semihosting_console_write_ch(c); - 2496: 4628 mov r0, r5 - 2498: f7ff ffe4 bl 2464 + 24f6: 4628 mov r0, r5 + 24f8: f7ff ffe4 bl 24c4 return character; - 249c: 4620 mov r0, r4 + 24fc: 4620 mov r0, r4 } - 249e: bd38 pop {r3, r4, r5, pc} - 24a0: 4628 mov r0, r5 + 24fe: bd38 pop {r3, r4, r5, pc} + 2500: 4628 mov r0, r5 if (g_silence_console) { return c; } - 24a2: e7fc b.n 249e + 2502: e7fc b.n 24fe semihosting_console_write_ch('\r'); - 24a4: 200d movs r0, #13 - 24a6: f7ff ffdd bl 2464 + 2504: 200d movs r0, #13 + 2506: f7ff ffdd bl 24c4 console_is_midline = 0; - 24aa: 4b03 ldr r3, [pc, #12] ; (24b8 ) - 24ac: 2200 movs r2, #0 - 24ae: 601a str r2, [r3, #0] - 24b0: e7f1 b.n 2496 - 24b2: bf00 nop - 24b4: 20006419 .word 0x20006419 - 24b8: 20006414 .word 0x20006414 + 250a: 4b03 ldr r3, [pc, #12] ; (2518 ) + 250c: 2200 movs r2, #0 + 250e: 601a str r2, [r3, #0] + 2510: e7f1 b.n 24f6 + 2512: bf00 nop + 2514: 20006419 .word 0x20006419 + 2518: 20006414 .word 0x20006414 -000024bc : +0000251c : void console_rx_restart(void) {} int semihosting_console_is_init(void) { return 1; } int semihosting_console_init(void) { return 0; } - 24bc: 2000 movs r0, #0 - 24be: 4770 bx lr + 251c: 2000 movs r0, #0 + 251e: 4770 bx lr -000024c0 : +00002520 : /* return value of CONSOLE_TICKS */ char console_get_ticks(void) { return do_ticks; } - 24c0: 4b01 ldr r3, [pc, #4] ; (24c8 ) - 24c2: 7818 ldrb r0, [r3, #0] - 24c4: 4770 bx lr - 24c6: bf00 nop - 24c8: 20004bb0 .word 0x20004bb0 + 2520: 4b01 ldr r3, [pc, #4] ; (2528 ) + 2522: 7818 ldrb r0, [r3, #0] + 2524: 4770 bx lr + 2526: bf00 nop + 2528: 20004bb0 .word 0x20004bb0 -000024cc : +0000252c : #include "os/mynewt.h" static void sysinit_dflt_panic_cb(const char *file, int line, const char *func, const char *expr, const char *msg) { - 24cc: b508 push {r3, lr} + 252c: b508 push {r3, lr} if (msg != NULL) { fprintf(stderr, "sysinit failure: %s\n", msg); } #endif __assert_func(file, line, func, expr); - 24ce: f7ff f91d bl 170c <__assert_func> + 252e: f7ff f8ed bl 170c <__assert_func> ... -000024d4 : +00002534 : } void sysinit_start(void) { sysinit_active = 1; - 24d4: 4b01 ldr r3, [pc, #4] ; (24dc ) - 24d6: 2201 movs r2, #1 - 24d8: 701a strb r2, [r3, #0] + 2534: 4b01 ldr r3, [pc, #4] ; (253c ) + 2536: 2201 movs r2, #1 + 2538: 701a strb r2, [r3, #0] } - 24da: 4770 bx lr - 24dc: 2000641a .word 0x2000641a + 253a: 4770 bx lr + 253c: 2000641a .word 0x2000641a -000024e0 : +00002540 : void sysinit_end(void) { sysinit_active = 0; - 24e0: 4b01 ldr r3, [pc, #4] ; (24e8 ) - 24e2: 2200 movs r2, #0 - 24e4: 701a strb r2, [r3, #0] + 2540: 4b01 ldr r3, [pc, #4] ; (2548 ) + 2542: 2200 movs r2, #0 + 2544: 701a strb r2, [r3, #0] } - 24e6: 4770 bx lr - 24e8: 2000641a .word 0x2000641a + 2546: 4770 bx lr + 2548: 2000641a .word 0x2000641a -000024ec : +0000254c : int mem_init_mbuf_pool(void *mem, struct os_mempool *mempool, struct os_mbuf_pool *mbuf_pool, int num_blocks, int block_size, char *name) { - 24ec: b570 push {r4, r5, r6, lr} - 24ee: b082 sub sp, #8 - 24f0: 460c mov r4, r1 - 24f2: 4616 mov r6, r2 + 254c: b570 push {r4, r5, r6, lr} + 254e: b082 sub sp, #8 + 2550: 460c mov r4, r1 + 2552: 4616 mov r6, r2 int rc; rc = os_mempool_init(mempool, num_blocks, block_size, mem, name); - 24f4: b29d uxth r5, r3 - 24f6: 9b07 ldr r3, [sp, #28] - 24f8: 9300 str r3, [sp, #0] - 24fa: 4603 mov r3, r0 - 24fc: 9a06 ldr r2, [sp, #24] - 24fe: 4629 mov r1, r5 - 2500: 4620 mov r0, r4 - 2502: f7ff fa1d bl 1940 + 2554: b29d uxth r5, r3 + 2556: 9b07 ldr r3, [sp, #28] + 2558: 9300 str r3, [sp, #0] + 255a: 4603 mov r3, r0 + 255c: 9a06 ldr r2, [sp, #24] + 255e: 4629 mov r1, r5 + 2560: 4620 mov r0, r4 + 2562: f7ff f9ed bl 1940 if (rc != 0) { - 2506: b108 cbz r0, 250c + 2566: b108 cbz r0, 256c if (rc != 0) { return rc; } return 0; } - 2508: b002 add sp, #8 - 250a: bd70 pop {r4, r5, r6, pc} + 2568: b002 add sp, #8 + 256a: bd70 pop {r4, r5, r6, pc} rc = os_mbuf_pool_init(mbuf_pool, mempool, block_size, num_blocks); - 250c: 462b mov r3, r5 - 250e: 9a06 ldr r2, [sp, #24] - 2510: b292 uxth r2, r2 - 2512: 4621 mov r1, r4 - 2514: 4630 mov r0, r6 - 2516: f7ff fb6f bl 1bf8 - 251a: e7f5 b.n 2508 - -0000251c : + 256c: 462b mov r3, r5 + 256e: 9a06 ldr r2, [sp, #24] + 2570: b292 uxth r2, r2 + 2572: 4621 mov r1, r4 + 2574: 4630 mov r0, r6 + 2576: f7ff fb3f bl 1bf8 + 257a: e7f5 b.n 2568 + +0000257c : void modlog_init(void); void pinetime_boot_init(void); void sysinit_app(void) { - 251c: b508 push {r3, lr} + 257c: b508 push {r3, lr} /*** Stage 0 */ /* 0.0: os_pkg_init (kernel/os) */ os_pkg_init(); - 251e: f7ff f9b9 bl 1894 + 257e: f7ff f989 bl 1894 /*** Stage 2 */ /* 2.0: flash_map_init (sys/flash_map) */ flash_map_init(); - 2522: f002 fad5 bl 4ad0 + 2582: f002 fad5 bl 4b30 /*** Stage 20 */ /* 20.0: console_pkg_init (libs/semihosting_console) */ console_pkg_init(); - 2526: f7ff fed9 bl 22dc + 2586: f7ff fed9 bl 233c /*** Stage 100 */ /* 100.0: mfg_init (sys/mfg) */ mfg_init(); - 252a: f002 fc0d bl 4d48 + 258a: f002 fc0d bl 4da8 /* 100.1: modlog_init (sys/log/modlog) */ modlog_init(); - 252e: f002 fafd bl 4b2c + 258e: f002 fafd bl 4b8c /*** Stage 900 */ /* 900.0: pinetime_boot_init (libs/pinetime_boot) */ pinetime_boot_init(); - 2532: f7ff fc6b bl 1e0c + 2592: f7ff fc63 bl 1e5c } - 2536: bd08 pop {r3, pc} + 2596: bd08 pop {r3, pc} -00002538 : +00002598 : static bool boot_is_header_valid(const struct image_header *hdr, const struct flash_area *fap) { uint32_t size; if (hdr->ih_magic != IMAGE_MAGIC) { - 2538: 6802 ldr r2, [r0, #0] - 253a: 4b0e ldr r3, [pc, #56] ; (2574 ) - 253c: 429a cmp r2, r3 - 253e: d001 beq.n 2544 + 2598: 6802 ldr r2, [r0, #0] + 259a: 4b0e ldr r3, [pc, #56] ; (25d4 ) + 259c: 429a cmp r2, r3 + 259e: d001 beq.n 25a4 return false; - 2540: 2000 movs r0, #0 - 2542: 4770 bx lr + 25a0: 2000 movs r0, #0 + 25a2: 4770 bx lr } if (!boot_u32_safe_add(&size, hdr->ih_img_size, hdr->ih_hdr_size)) { - 2544: 68c2 ldr r2, [r0, #12] - 2546: 8903 ldrh r3, [r0, #8] + 25a4: 68c2 ldr r2, [r0, #12] + 25a6: 8903 ldrh r3, [r0, #8] { /* * "a + b <= UINT32_MAX", subtract 'b' from both sides to avoid * the overflow. */ if (a > UINT32_MAX - b) { - 2548: 43d8 mvns r0, r3 - 254a: 4282 cmp r2, r0 - 254c: d80a bhi.n 2564 + 25a8: 43d8 mvns r0, r3 + 25aa: 4282 cmp r2, r0 + 25ac: d80a bhi.n 25c4 { - 254e: b410 push {r4} + 25ae: b410 push {r4} return false; } else { *dest = a + b; - 2550: 18d4 adds r4, r2, r3 + 25b0: 18d4 adds r4, r2, r3 return true; - 2552: 2001 movs r0, #1 + 25b2: 2001 movs r0, #1 if (!boot_u32_safe_add(&size, hdr->ih_img_size, hdr->ih_hdr_size)) { - 2554: b110 cbz r0, 255c + 25b4: b110 cbz r0, 25bc return false; } if (size >= fap->fa_size) { - 2556: 688b ldr r3, [r1, #8] - 2558: 42a3 cmp r3, r4 - 255a: d901 bls.n 2560 + 25b6: 688b ldr r3, [r1, #8] + 25b8: 42a3 cmp r3, r4 + 25ba: d901 bls.n 25c0 return false; } return true; } - 255c: bc10 pop {r4} - 255e: 4770 bx lr + 25bc: bc10 pop {r4} + 25be: 4770 bx lr return false; - 2560: 2000 movs r0, #0 - 2562: e7fb b.n 255c + 25c0: 2000 movs r0, #0 + 25c2: e7fb b.n 25bc return false; - 2564: 2000 movs r0, #0 + 25c4: 2000 movs r0, #0 if (!boot_u32_safe_add(&size, hdr->ih_img_size, hdr->ih_hdr_size)) { - 2566: b110 cbz r0, 256e + 25c6: b110 cbz r0, 25ce if (size >= fap->fa_size) { - 2568: 688b ldr r3, [r1, #8] - 256a: 42a3 cmp r3, r4 - 256c: d900 bls.n 2570 + 25c8: 688b ldr r3, [r1, #8] + 25ca: 42a3 cmp r3, r4 + 25cc: d900 bls.n 25d0 } - 256e: 4770 bx lr + 25ce: 4770 bx lr return false; - 2570: 2000 movs r0, #0 - 2572: e7fc b.n 256e - 2574: 96f3b83d .word 0x96f3b83d + 25d0: 2000 movs r0, #0 + 25d2: e7fc b.n 25ce + 25d4: 96f3b83d .word 0x96f3b83d -00002578 : +000025d8 : { - 2578: b538 push {r3, r4, r5, lr} - 257a: 4604 mov r4, r0 + 25d8: b538 push {r3, r4, r5, lr} + 25da: 4604 mov r4, r0 elem_sz = flash_area_align(BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT)); - 257c: 6a00 ldr r0, [r0, #32] - 257e: f002 fa96 bl 4aae - 2582: 4605 mov r5, r0 + 25dc: 6a00 ldr r0, [r0, #32] + 25de: f002 fa96 bl 4b0e + 25e2: 4605 mov r5, r0 align = flash_area_align(BOOT_SCRATCH_AREA(state)); - 2584: 6da0 ldr r0, [r4, #88] ; 0x58 - 2586: f002 fa92 bl 4aae + 25e4: 6da0 ldr r0, [r4, #88] ; 0x58 + 25e6: f002 fa92 bl 4b0e if (align > elem_sz) { - 258a: 4285 cmp r5, r0 - 258c: d200 bcs.n 2590 + 25ea: 4285 cmp r5, r0 + 25ec: d200 bcs.n 25f0 } - 258e: bd38 pop {r3, r4, r5, pc} + 25ee: bd38 pop {r3, r4, r5, pc} elem_sz = flash_area_align(BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT)); - 2590: 4628 mov r0, r5 + 25f0: 4628 mov r0, r5 return elem_sz; - 2592: e7fc b.n 258e + 25f2: e7fc b.n 25ee -00002594 : +000025f4 : { - 2594: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 2598: b082 sub sp, #8 - 259a: 4680 mov r8, r0 - 259c: 460d mov r5, r1 - 259e: 4617 mov r7, r2 + 25f4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 25f8: b082 sub sp, #8 + 25fa: 4680 mov r8, r0 + 25fc: 460d mov r5, r1 + 25fe: 4617 mov r7, r2 area_id = flash_area_id_from_multi_image_slot(BOOT_CURR_IMG(state), slot); - 25a0: 2000 movs r0, #0 - 25a2: f001 fb8a bl 3cba + 2600: 2000 movs r0, #0 + 2602: f001 fb8a bl 3d1a rc = flash_area_open(area_id, &fap); - 25a6: a901 add r1, sp, #4 - 25a8: b2c0 uxtb r0, r0 - 25aa: f002 f9e9 bl 4980 + 2606: a901 add r1, sp, #4 + 2608: b2c0 uxtb r0, r0 + 260a: f002 f9e9 bl 49e0 if (rc != 0) { - 25ae: b120 cbz r0, 25ba + 260e: b120 cbz r0, 261a rc = BOOT_EFLASH; - 25b0: 2401 movs r4, #1 + 2610: 2401 movs r4, #1 } - 25b2: 4620 mov r0, r4 - 25b4: b002 add sp, #8 - 25b6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 2612: 4620 mov r0, r4 + 2614: b002 add sp, #8 + 2616: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} off = BOOT_TLV_OFF(boot_img_hdr(state, slot)); - 25ba: 232c movs r3, #44 ; 0x2c - 25bc: fb03 8305 mla r3, r3, r5, r8 - 25c0: 891e ldrh r6, [r3, #8] - 25c2: 68db ldr r3, [r3, #12] - 25c4: 441e add r6, r3 + 261a: 232c movs r3, #44 ; 0x2c + 261c: fb03 8305 mla r3, r3, r5, r8 + 2620: 891e ldrh r6, [r3, #8] + 2622: 68db ldr r3, [r3, #12] + 2624: 441e add r6, r3 if (flash_area_read(fap, off, &info, sizeof(info))) { - 25c6: 2304 movs r3, #4 - 25c8: 466a mov r2, sp - 25ca: 4631 mov r1, r6 - 25cc: 9801 ldr r0, [sp, #4] - 25ce: f002 fa35 bl 4a3c - 25d2: 4604 mov r4, r0 - 25d4: bb30 cbnz r0, 2624 + 2626: 2304 movs r3, #4 + 2628: 466a mov r2, sp + 262a: 4631 mov r1, r6 + 262c: 9801 ldr r0, [sp, #4] + 262e: f002 fa35 bl 4a9c + 2632: 4604 mov r4, r0 + 2634: bb30 cbnz r0, 2684 protect_tlv_size = boot_img_hdr(state, slot)->ih_protect_tlv_size; - 25d6: 232c movs r3, #44 ; 0x2c - 25d8: fb03 8505 mla r5, r3, r5, r8 - 25dc: 896d ldrh r5, [r5, #10] + 2636: 232c movs r3, #44 ; 0x2c + 2638: fb03 8505 mla r5, r3, r5, r8 + 263c: 896d ldrh r5, [r5, #10] if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { - 25de: f8bd 2000 ldrh.w r2, [sp] - 25e2: f646 1308 movw r3, #26888 ; 0x6908 - 25e6: 429a cmp r2, r3 - 25e8: d00c beq.n 2604 + 263e: f8bd 2000 ldrh.w r2, [sp] + 2642: f646 1308 movw r3, #26888 ; 0x6908 + 2646: 429a cmp r2, r3 + 2648: d00c beq.n 2664 } else if (protect_tlv_size != 0) { - 25ea: b9ed cbnz r5, 2628 + 264a: b9ed cbnz r5, 2688 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { - 25ec: f8bd 2000 ldrh.w r2, [sp] - 25f0: f646 1307 movw r3, #26887 ; 0x6907 - 25f4: 429a cmp r2, r3 - 25f6: d119 bne.n 262c + 264c: f8bd 2000 ldrh.w r2, [sp] + 2650: f646 1307 movw r3, #26887 ; 0x6907 + 2654: 429a cmp r2, r3 + 2656: d119 bne.n 268c *size = off + protect_tlv_size + info.it_tlv_tot; - 25f8: 442e add r6, r5 - 25fa: f8bd 3002 ldrh.w r3, [sp, #2] - 25fe: 441e add r6, r3 - 2600: 603e str r6, [r7, #0] - 2602: e7d6 b.n 25b2 + 2658: 442e add r6, r5 + 265a: f8bd 3002 ldrh.w r3, [sp, #2] + 265e: 441e add r6, r3 + 2660: 603e str r6, [r7, #0] + 2662: e7d6 b.n 2612 if (protect_tlv_size != info.it_tlv_tot) { - 2604: f8bd 1002 ldrh.w r1, [sp, #2] - 2608: 428d cmp r5, r1 - 260a: d001 beq.n 2610 + 2664: f8bd 1002 ldrh.w r1, [sp, #2] + 2668: 428d cmp r5, r1 + 266a: d001 beq.n 2670 rc = BOOT_EBADIMAGE; - 260c: 2403 movs r4, #3 - 260e: e7d0 b.n 25b2 + 266c: 2403 movs r4, #3 + 266e: e7d0 b.n 2612 if (flash_area_read(fap, off + info.it_tlv_tot, &info, sizeof(info))) { - 2610: 2304 movs r3, #4 - 2612: 466a mov r2, sp - 2614: 4431 add r1, r6 - 2616: 9801 ldr r0, [sp, #4] - 2618: f002 fa10 bl 4a3c - 261c: 2800 cmp r0, #0 - 261e: d0e5 beq.n 25ec + 2670: 2304 movs r3, #4 + 2672: 466a mov r2, sp + 2674: 4431 add r1, r6 + 2676: 9801 ldr r0, [sp, #4] + 2678: f002 fa10 bl 4a9c + 267c: 2800 cmp r0, #0 + 267e: d0e5 beq.n 264c rc = BOOT_EFLASH; - 2620: 2401 movs r4, #1 - 2622: e7c6 b.n 25b2 + 2680: 2401 movs r4, #1 + 2682: e7c6 b.n 2612 rc = BOOT_EFLASH; - 2624: 2401 movs r4, #1 - 2626: e7c4 b.n 25b2 + 2684: 2401 movs r4, #1 + 2686: e7c4 b.n 2612 rc = BOOT_EBADIMAGE; - 2628: 2403 movs r4, #3 - 262a: e7c2 b.n 25b2 + 2688: 2403 movs r4, #3 + 268a: e7c2 b.n 2612 rc = BOOT_EBADIMAGE; - 262c: 2403 movs r4, #3 + 268c: 2403 movs r4, #3 return rc; - 262e: e7c0 b.n 25b2 + 268e: e7c0 b.n 2612 -00002630 : +00002690 : return true; } static int boot_check_header_erased(struct boot_loader_state *state, int slot) { - 2630: b570 push {r4, r5, r6, lr} - 2632: b082 sub sp, #8 - 2634: 4606 mov r6, r0 - 2636: 460c mov r4, r1 + 2690: b570 push {r4, r5, r6, lr} + 2692: b082 sub sp, #8 + 2694: 4606 mov r6, r0 + 2696: 460c mov r4, r1 struct image_header *hdr; uint8_t erased_val; int area_id; int rc; area_id = flash_area_id_from_multi_image_slot(BOOT_CURR_IMG(state), slot); - 2638: 2000 movs r0, #0 - 263a: f001 fb3e bl 3cba + 2698: 2000 movs r0, #0 + 269a: f001 fb3e bl 3d1a rc = flash_area_open(area_id, &fap); - 263e: a901 add r1, sp, #4 - 2640: b2c0 uxtb r0, r0 - 2642: f002 f99d bl 4980 + 269e: a901 add r1, sp, #4 + 26a0: b2c0 uxtb r0, r0 + 26a2: f002 f99d bl 49e0 if (rc != 0) { - 2646: b9d0 cbnz r0, 267e - 2648: 4605 mov r5, r0 + 26a6: b9d0 cbnz r0, 26de + 26a8: 4605 mov r5, r0 return -1; } erased_val = flash_area_erased_val(fap); - 264a: 9801 ldr r0, [sp, #4] - 264c: f002 fa34 bl 4ab8 - 2650: b2c0 uxtb r0, r0 + 26aa: 9801 ldr r0, [sp, #4] + 26ac: f002 fa34 bl 4b18 + 26b0: b2c0 uxtb r0, r0 flash_area_close(fap); hdr = boot_img_hdr(state, slot); if (!boot_data_is_set_to(erased_val, &hdr->ih_magic, sizeof(hdr->ih_magic))) { - 2652: 212c movs r1, #44 ; 0x2c - 2654: fb01 6104 mla r1, r1, r4, r6 + 26b2: 212c movs r1, #44 ; 0x2c + 26b4: fb01 6104 mla r1, r1, r4, r6 for (i = 0; i < len; i++) { - 2658: 2300 movs r3, #0 - 265a: 2b03 cmp r3, #3 - 265c: d805 bhi.n 266a + 26b8: 2300 movs r3, #0 + 26ba: 2b03 cmp r3, #3 + 26bc: d805 bhi.n 26ca if (val != p[i]) { - 265e: 5cca ldrb r2, [r1, r3] - 2660: 4290 cmp r0, r2 - 2662: d107 bne.n 2674 + 26be: 5cca ldrb r2, [r1, r3] + 26c0: 4290 cmp r0, r2 + 26c2: d107 bne.n 26d4 for (i = 0; i < len; i++) { - 2664: 3301 adds r3, #1 - 2666: b2db uxtb r3, r3 - 2668: e7f7 b.n 265a + 26c4: 3301 adds r3, #1 + 26c6: b2db uxtb r3, r3 + 26c8: e7f7 b.n 26ba return true; - 266a: 2301 movs r3, #1 + 26ca: 2301 movs r3, #1 if (!boot_data_is_set_to(erased_val, &hdr->ih_magic, sizeof(hdr->ih_magic))) { - 266c: b123 cbz r3, 2678 + 26cc: b123 cbz r3, 26d8 return -1; } return 0; } - 266e: 4628 mov r0, r5 - 2670: b002 add sp, #8 - 2672: bd70 pop {r4, r5, r6, pc} + 26ce: 4628 mov r0, r5 + 26d0: b002 add sp, #8 + 26d2: bd70 pop {r4, r5, r6, pc} return false; - 2674: 2300 movs r3, #0 - 2676: e7f9 b.n 266c + 26d4: 2300 movs r3, #0 + 26d6: e7f9 b.n 26cc return -1; - 2678: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff - 267c: e7f7 b.n 266e + 26d8: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff + 26dc: e7f7 b.n 26ce return -1; - 267e: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff - 2682: e7f4 b.n 266e + 26de: f04f 35ff mov.w r5, #4294967295 ; 0xffffffff + 26e2: e7f4 b.n 26ce -00002684 : +000026e4 : { - 2684: b510 push {r4, lr} - 2686: b082 sub sp, #8 - 2688: 4604 mov r4, r0 - 268a: 4608 mov r0, r1 + 26e4: b510 push {r4, lr} + 26e6: b082 sub sp, #8 + 26e8: 4604 mov r4, r0 + 26ea: 4608 mov r0, r1 int num_sectors = BOOT_MAX_IMG_SECTORS; - 268c: 2380 movs r3, #128 ; 0x80 - 268e: 9301 str r3, [sp, #4] + 26ec: 2380 movs r3, #128 ; 0x80 + 26ee: 9301 str r3, [sp, #4] if (flash_area == FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state))) { - 2690: 2901 cmp r1, #1 - 2692: d006 beq.n 26a2 + 26f0: 2901 cmp r1, #1 + 26f2: d006 beq.n 2702 } else if (flash_area == FLASH_AREA_IMAGE_SECONDARY(BOOT_CURR_IMG(state))) { - 2694: 2902 cmp r1, #2 - 2696: d00b beq.n 26b0 + 26f4: 2902 cmp r1, #2 + 26f6: d00b beq.n 2710 } else if (flash_area == FLASH_AREA_IMAGE_SCRATCH) { - 2698: 2903 cmp r1, #3 - 269a: d010 beq.n 26be + 26f8: 2903 cmp r1, #3 + 26fa: d010 beq.n 271e return BOOT_EFLASH; - 269c: 2001 movs r0, #1 + 26fc: 2001 movs r0, #1 } - 269e: b002 add sp, #8 - 26a0: bd10 pop {r4, pc} + 26fe: b002 add sp, #8 + 2700: bd10 pop {r4, pc} rc = flash_area_to_sectors(flash_area, &num_sectors, - 26a2: 6a62 ldr r2, [r4, #36] ; 0x24 - 26a4: a901 add r1, sp, #4 - 26a6: f002 f98b bl 49c0 + 2702: 6a62 ldr r2, [r4, #36] ; 0x24 + 2704: a901 add r1, sp, #4 + 2706: f002 f98b bl 4a20 BOOT_IMG(state, BOOT_PRIMARY_SLOT).num_sectors = (size_t)num_sectors; - 26aa: 9b01 ldr r3, [sp, #4] - 26ac: 62a3 str r3, [r4, #40] ; 0x28 - 26ae: e7f6 b.n 269e + 270a: 9b01 ldr r3, [sp, #4] + 270c: 62a3 str r3, [r4, #40] ; 0x28 + 270e: e7f6 b.n 26fe rc = flash_area_to_sectors(flash_area, &num_sectors, - 26b0: 6d22 ldr r2, [r4, #80] ; 0x50 - 26b2: a901 add r1, sp, #4 - 26b4: f002 f984 bl 49c0 + 2710: 6d22 ldr r2, [r4, #80] ; 0x50 + 2712: a901 add r1, sp, #4 + 2714: f002 f984 bl 4a20 BOOT_IMG(state, BOOT_SECONDARY_SLOT).num_sectors = (size_t)num_sectors; - 26b8: 9b01 ldr r3, [sp, #4] - 26ba: 6563 str r3, [r4, #84] ; 0x54 - 26bc: e7ef b.n 269e + 2718: 9b01 ldr r3, [sp, #4] + 271a: 6563 str r3, [r4, #84] ; 0x54 + 271c: e7ef b.n 26fe rc = flash_area_to_sectors(flash_area, &num_sectors, - 26be: 6de2 ldr r2, [r4, #92] ; 0x5c - 26c0: a901 add r1, sp, #4 - 26c2: f002 f97d bl 49c0 + 271e: 6de2 ldr r2, [r4, #92] ; 0x5c + 2720: a901 add r1, sp, #4 + 2722: f002 f97d bl 4a20 state->scratch.num_sectors = (size_t)num_sectors; - 26c6: 9b01 ldr r3, [sp, #4] - 26c8: 6623 str r3, [r4, #96] ; 0x60 - 26ca: e7e8 b.n 269e + 2726: 9b01 ldr r3, [sp, #4] + 2728: 6623 str r3, [r4, #96] ; 0x60 + 272a: e7e8 b.n 26fe -000026cc : +0000272c : { - 26cc: b538 push {r3, r4, r5, lr} - 26ce: 4605 mov r5, r0 + 272c: b538 push {r3, r4, r5, lr} + 272e: 4605 mov r5, r0 rc = boot_initialize_area(state, FLASH_AREA_IMAGE_PRIMARY(image_index)); - 26d0: 2101 movs r1, #1 - 26d2: f7ff ffd7 bl 2684 + 2730: 2101 movs r1, #1 + 2732: f7ff ffd7 bl 26e4 if (rc != 0) { - 26d6: b110 cbz r0, 26de + 2736: b110 cbz r0, 273e return BOOT_EFLASH; - 26d8: 2401 movs r4, #1 + 2738: 2401 movs r4, #1 } - 26da: 4620 mov r0, r4 - 26dc: bd38 pop {r3, r4, r5, pc} + 273a: 4620 mov r0, r4 + 273c: bd38 pop {r3, r4, r5, pc} rc = boot_initialize_area(state, FLASH_AREA_IMAGE_SECONDARY(image_index)); - 26de: 2102 movs r1, #2 - 26e0: 4628 mov r0, r5 - 26e2: f7ff ffcf bl 2684 + 273e: 2102 movs r1, #2 + 2740: 4628 mov r0, r5 + 2742: f7ff ffcf bl 26e4 if (rc != 0) { - 26e6: b108 cbz r0, 26ec + 2746: b108 cbz r0, 274c return BOOT_EFLASH; - 26e8: 2401 movs r4, #1 - 26ea: e7f6 b.n 26da + 2748: 2401 movs r4, #1 + 274a: e7f6 b.n 273a rc = boot_initialize_area(state, FLASH_AREA_IMAGE_SCRATCH); - 26ec: 2103 movs r1, #3 - 26ee: 4628 mov r0, r5 - 26f0: f7ff ffc8 bl 2684 + 274c: 2103 movs r1, #3 + 274e: 4628 mov r0, r5 + 2750: f7ff ffc8 bl 26e4 if (rc != 0) { - 26f4: 4604 mov r4, r0 - 26f6: b108 cbz r0, 26fc + 2754: 4604 mov r4, r0 + 2756: b108 cbz r0, 275c return BOOT_EFLASH; - 26f8: 2401 movs r4, #1 - 26fa: e7ee b.n 26da + 2758: 2401 movs r4, #1 + 275a: e7ee b.n 273a BOOT_WRITE_SZ(state) = boot_write_sz(state); - 26fc: 4628 mov r0, r5 - 26fe: f7ff ff3b bl 2578 - 2702: 66a8 str r0, [r5, #104] ; 0x68 + 275c: 4628 mov r0, r5 + 275e: f7ff ff3b bl 25d8 + 2762: 66a8 str r0, [r5, #104] ; 0x68 return 0; - 2704: e7e9 b.n 26da + 2764: e7e9 b.n 273a ... -00002708 : +00002768 : { - 2708: b500 push {lr} - 270a: b087 sub sp, #28 + 2768: b500 push {lr} + 276a: b087 sub sp, #28 if (bootutil_img_validate(BOOT_CURR_ENC(state), image_index, hdr, fap, tmpbuf, - 270c: 2000 movs r0, #0 - 270e: 9004 str r0, [sp, #16] - 2710: 9003 str r0, [sp, #12] - 2712: 9002 str r0, [sp, #8] - 2714: f44f 7380 mov.w r3, #256 ; 0x100 - 2718: 9301 str r3, [sp, #4] - 271a: 4b07 ldr r3, [pc, #28] ; (2738 ) - 271c: 9300 str r3, [sp, #0] - 271e: 4613 mov r3, r2 - 2720: 460a mov r2, r1 - 2722: 4601 mov r1, r0 - 2724: f001 f9ab bl 3a7e - 2728: 4603 mov r3, r0 - 272a: b918 cbnz r0, 2734 -} - 272c: 4618 mov r0, r3 - 272e: b007 add sp, #28 - 2730: f85d fb04 ldr.w pc, [sp], #4 + 276c: 2000 movs r0, #0 + 276e: 9004 str r0, [sp, #16] + 2770: 9003 str r0, [sp, #12] + 2772: 9002 str r0, [sp, #8] + 2774: f44f 7380 mov.w r3, #256 ; 0x100 + 2778: 9301 str r3, [sp, #4] + 277a: 4b07 ldr r3, [pc, #28] ; (2798 ) + 277c: 9300 str r3, [sp, #0] + 277e: 4613 mov r3, r2 + 2780: 460a mov r2, r1 + 2782: 4601 mov r1, r0 + 2784: f001 f9ab bl 3ade + 2788: 4603 mov r3, r0 + 278a: b918 cbnz r0, 2794 +} + 278c: 4618 mov r0, r3 + 278e: b007 add sp, #28 + 2790: f85d fb04 ldr.w pc, [sp], #4 return BOOT_EBADIMAGE; - 2734: 2303 movs r3, #3 - 2736: e7f9 b.n 272c - 2738: 20006220 .word 0x20006220 + 2794: 2303 movs r3, #3 + 2796: e7f9 b.n 278c + 2798: 20006220 .word 0x20006220 -0000273c : +0000279c : * -1 on any errors */ static int boot_validate_slot(struct boot_loader_state *state, int slot, struct boot_status *bs) { - 273c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 2740: b082 sub sp, #8 - 2742: 4605 mov r5, r0 - 2744: 460c mov r4, r1 - 2746: 4617 mov r7, r2 + 279c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 27a0: b082 sub sp, #8 + 27a2: 4605 mov r5, r0 + 27a4: 460c mov r4, r1 + 27a6: 4617 mov r7, r2 const struct flash_area *fap; struct image_header *hdr; int area_id; int rc; area_id = flash_area_id_from_multi_image_slot(BOOT_CURR_IMG(state), slot); - 2748: 2000 movs r0, #0 - 274a: f001 fab6 bl 3cba + 27a8: 2000 movs r0, #0 + 27aa: f001 fab6 bl 3d1a rc = flash_area_open(area_id, &fap); - 274e: a901 add r1, sp, #4 - 2750: b2c0 uxtb r0, r0 - 2752: f002 f915 bl 4980 + 27ae: a901 add r1, sp, #4 + 27b0: b2c0 uxtb r0, r0 + 27b2: f002 f915 bl 49e0 if (rc != 0) { - 2756: bb60 cbnz r0, 27b2 + 27b6: bb60 cbnz r0, 2812 ((swap_type) == BOOT_SWAP_TYPE_PERM)) static inline struct image_header* boot_img_hdr(struct boot_loader_state *state, size_t slot) { return &BOOT_IMG(state, slot).hdr; - 2758: 202c movs r0, #44 ; 0x2c - 275a: fb00 5604 mla r6, r0, r4, r5 + 27b8: 202c movs r0, #44 ; 0x2c + 27ba: fb00 5604 mla r6, r0, r4, r5 return -1; } hdr = boot_img_hdr(state, slot); if (boot_check_header_erased(state, slot) == 0 || - 275e: 4621 mov r1, r4 - 2760: 4628 mov r0, r5 - 2762: f7ff ff65 bl 2630 - 2766: b338 cbz r0, 27b8 + 27be: 4621 mov r1, r4 + 27c0: 4628 mov r0, r5 + 27c2: f7ff ff65 bl 2690 + 27c6: b338 cbz r0, 2818 (hdr->ih_flags & IMAGE_F_NON_BOOTABLE)) { - 2768: 6933 ldr r3, [r6, #16] + 27c8: 6933 ldr r3, [r6, #16] if (boot_check_header_erased(state, slot) == 0 || - 276a: f013 0f10 tst.w r3, #16 - 276e: d128 bne.n 27c2 + 27ca: f013 0f10 tst.w r3, #16 + 27ce: d128 bne.n 2822 goto out; } } #endif if (!boot_is_header_valid(hdr, fap) || boot_image_check(state, hdr, fap, bs)) { - 2770: f8dd 8004 ldr.w r8, [sp, #4] - 2774: 4641 mov r1, r8 - 2776: 4630 mov r0, r6 - 2778: f7ff fede bl 2538 - 277c: b938 cbnz r0, 278e + 27d0: f8dd 8004 ldr.w r8, [sp, #4] + 27d4: 4641 mov r1, r8 + 27d6: 4630 mov r0, r6 + 27d8: f7ff fede bl 2598 + 27dc: b938 cbnz r0, 27ee if (slot != BOOT_PRIMARY_SLOT) { - 277e: b984 cbnz r4, 27a2 + 27de: b984 cbnz r4, 2802 /* Image in the secondary slot is invalid. Erase the image and * continue booting from the primary slot. */ } #if !defined(__BOOTSIM__) BOOT_LOG_ERR("Image in the %s slot is not valid!", - 2780: b9ac cbnz r4, 27ae - 2782: 4911 ldr r1, [pc, #68] ; (27c8 ) - 2784: 4811 ldr r0, [pc, #68] ; (27cc ) - 2786: f002 f8a3 bl 48d0 + 27e0: b9ac cbnz r4, 280e + 27e2: 4911 ldr r1, [pc, #68] ; (2828 ) + 27e4: 4811 ldr r0, [pc, #68] ; (282c ) + 27e6: f002 f8a3 bl 4930 (slot == BOOT_PRIMARY_SLOT) ? "primary" : "secondary"); #endif rc = 1; - 278a: 2301 movs r3, #1 + 27ea: 2301 movs r3, #1 goto out; - 278c: e015 b.n 27ba + 27ec: e015 b.n 281a if (!boot_is_header_valid(hdr, fap) || boot_image_check(state, hdr, fap, bs)) { - 278e: 463b mov r3, r7 - 2790: 4642 mov r2, r8 - 2792: 4631 mov r1, r6 - 2794: 4628 mov r0, r5 - 2796: f7ff ffb7 bl 2708 - 279a: 4603 mov r3, r0 - 279c: 2800 cmp r0, #0 - 279e: d1ee bne.n 277e - 27a0: e00b b.n 27ba + 27ee: 463b mov r3, r7 + 27f0: 4642 mov r2, r8 + 27f2: 4631 mov r1, r6 + 27f4: 4628 mov r0, r5 + 27f6: f7ff ffb7 bl 2768 + 27fa: 4603 mov r3, r0 + 27fc: 2800 cmp r0, #0 + 27fe: d1ee bne.n 27de + 2800: e00b b.n 281a flash_area_erase(fap, 0, fap->fa_size); - 27a2: 9801 ldr r0, [sp, #4] - 27a4: 6882 ldr r2, [r0, #8] - 27a6: 2100 movs r1, #0 - 27a8: f002 f96e bl 4a88 - 27ac: e7e8 b.n 2780 + 2802: 9801 ldr r0, [sp, #4] + 2804: 6882 ldr r2, [r0, #8] + 2806: 2100 movs r1, #0 + 2808: f002 f96e bl 4ae8 + 280c: e7e8 b.n 27e0 BOOT_LOG_ERR("Image in the %s slot is not valid!", - 27ae: 4908 ldr r1, [pc, #32] ; (27d0 ) - 27b0: e7e8 b.n 2784 + 280e: 4908 ldr r1, [pc, #32] ; (2830 ) + 2810: e7e8 b.n 27e4 return -1; - 27b2: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 27b6: e000 b.n 27ba + 2812: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 2816: e000 b.n 281a rc = 1; - 27b8: 2301 movs r3, #1 + 2818: 2301 movs r3, #1 rc = 0; out: flash_area_close(fap); return rc; } - 27ba: 4618 mov r0, r3 - 27bc: b002 add sp, #8 - 27be: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 281a: 4618 mov r0, r3 + 281c: b002 add sp, #8 + 281e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} rc = 1; - 27c2: 2301 movs r3, #1 - 27c4: e7f9 b.n 27ba - 27c6: bf00 nop - 27c8: 00005444 .word 0x00005444 - 27cc: 00005458 .word 0x00005458 - 27d0: 0000544c .word 0x0000544c - -000027d4 : + 2822: 2301 movs r3, #1 + 2824: e7f9 b.n 281a + 2826: bf00 nop + 2828: 000054ec .word 0x000054ec + 282c: 00005500 .word 0x00005500 + 2830: 000054f4 .word 0x000054f4 + +00002834 : * @return The type of swap to perform (BOOT_SWAP_TYPE...) */ static int boot_validated_swap_type(struct boot_loader_state *state, struct boot_status *bs) { - 27d4: b570 push {r4, r5, r6, lr} - 27d6: 4605 mov r5, r0 - 27d8: 460e mov r6, r1 + 2834: b570 push {r4, r5, r6, lr} + 2836: 4605 mov r5, r0 + 2838: 460e mov r6, r1 int swap_type; int rc; swap_type = boot_swap_type_multi(BOOT_CURR_IMG(state)); - 27da: 2000 movs r0, #0 - 27dc: f001 f8a4 bl 3928 - 27e0: 4604 mov r4, r0 + 283a: 2000 movs r0, #0 + 283c: f001 f8a4 bl 3988 + 2840: 4604 mov r4, r0 if (BOOT_IS_UPGRADE(swap_type)) { - 27e2: 2802 cmp r0, #2 - 27e4: d005 beq.n 27f2 - 27e6: 2804 cmp r0, #4 - 27e8: d003 beq.n 27f2 - 27ea: 2803 cmp r0, #3 - 27ec: d001 beq.n 27f2 + 2842: 2802 cmp r0, #2 + 2844: d005 beq.n 2852 + 2846: 2804 cmp r0, #4 + 2848: d003 beq.n 2852 + 284a: 2803 cmp r0, #3 + 284c: d001 beq.n 2852 swap_type = BOOT_SWAP_TYPE_FAIL; } } return swap_type; } - 27ee: 4620 mov r0, r4 - 27f0: bd70 pop {r4, r5, r6, pc} + 284e: 4620 mov r0, r4 + 2850: bd70 pop {r4, r5, r6, pc} rc = boot_validate_slot(state, BOOT_SECONDARY_SLOT, bs); - 27f2: 4632 mov r2, r6 - 27f4: 2101 movs r1, #1 - 27f6: 4628 mov r0, r5 - 27f8: f7ff ffa0 bl 273c + 2852: 4632 mov r2, r6 + 2854: 2101 movs r1, #1 + 2856: 4628 mov r0, r5 + 2858: f7ff ffa0 bl 279c if (rc == 1) { - 27fc: 2801 cmp r0, #1 - 27fe: d003 beq.n 2808 + 285c: 2801 cmp r0, #1 + 285e: d003 beq.n 2868 } else if (rc != 0) { - 2800: 2800 cmp r0, #0 - 2802: d0f4 beq.n 27ee + 2860: 2800 cmp r0, #0 + 2862: d0f4 beq.n 284e swap_type = BOOT_SWAP_TYPE_FAIL; - 2804: 2405 movs r4, #5 + 2864: 2405 movs r4, #5 return swap_type; - 2806: e7f2 b.n 27ee + 2866: e7f2 b.n 284e swap_type = BOOT_SWAP_TYPE_NONE; - 2808: 4604 mov r4, r0 - 280a: e7f0 b.n 27ee + 2868: 4604 mov r4, r0 + 286a: e7f0 b.n 284e -0000280c : +0000286c : { - 280c: b5f8 push {r3, r4, r5, r6, r7, lr} - 280e: 4605 mov r5, r0 - 2810: 460f mov r7, r1 - 2812: 4616 mov r6, r2 + 286c: b5f8 push {r3, r4, r5, r6, r7, lr} + 286e: 4605 mov r5, r0 + 2870: 460f mov r7, r1 + 2872: 4616 mov r6, r2 for (i = 0; i < BOOT_NUM_SLOTS; i++) { - 2814: 2400 movs r4, #0 - 2816: 2c01 cmp r4, #1 - 2818: dc10 bgt.n 283c + 2874: 2400 movs r4, #0 + 2876: 2c01 cmp r4, #1 + 2878: dc10 bgt.n 289c rc = boot_read_image_header(state, i, boot_img_hdr(state, i), bs); - 281a: 4633 mov r3, r6 - 281c: 222c movs r2, #44 ; 0x2c - 281e: fb02 5204 mla r2, r2, r4, r5 - 2822: 4621 mov r1, r4 - 2824: 4628 mov r0, r5 - 2826: f000 fd02 bl 322e + 287a: 4633 mov r3, r6 + 287c: 222c movs r2, #44 ; 0x2c + 287e: fb02 5204 mla r2, r2, r4, r5 + 2882: 4621 mov r1, r4 + 2884: 4628 mov r0, r5 + 2886: f000 fd02 bl 328e if (rc != 0) { - 282a: 4603 mov r3, r0 - 282c: b908 cbnz r0, 2832 + 288a: 4603 mov r3, r0 + 288c: b908 cbnz r0, 2892 for (i = 0; i < BOOT_NUM_SLOTS; i++) { - 282e: 3401 adds r4, #1 - 2830: e7f1 b.n 2816 + 288e: 3401 adds r4, #1 + 2890: e7f1 b.n 2876 if (i > 0 && !require_all) { - 2832: 2c00 cmp r4, #0 - 2834: dd03 ble.n 283e - 2836: b917 cbnz r7, 283e + 2892: 2c00 cmp r4, #0 + 2894: dd03 ble.n 289e + 2896: b917 cbnz r7, 289e return 0; - 2838: 2300 movs r3, #0 - 283a: e000 b.n 283e + 2898: 2300 movs r3, #0 + 289a: e000 b.n 289e return 0; - 283c: 2300 movs r3, #0 + 289c: 2300 movs r3, #0 } - 283e: 4618 mov r0, r3 - 2840: bdf8 pop {r3, r4, r5, r6, r7, pc} + 289e: 4618 mov r0, r3 + 28a0: bdf8 pop {r3, r4, r5, r6, r7, pc} -00002842 : +000028a2 : bs->use_scratch = 0; - 2842: 2300 movs r3, #0 - 2844: 7183 strb r3, [r0, #6] + 28a2: 2300 movs r3, #0 + 28a4: 7183 strb r3, [r0, #6] bs->swap_size = 0; - 2846: 6083 str r3, [r0, #8] + 28a6: 6083 str r3, [r0, #8] bs->source = 0; - 2848: 60c3 str r3, [r0, #12] + 28a8: 60c3 str r3, [r0, #12] bs->op = BOOT_STATUS_OP_MOVE; - 284a: 2301 movs r3, #1 - 284c: 7143 strb r3, [r0, #5] + 28aa: 2301 movs r3, #1 + 28ac: 7143 strb r3, [r0, #5] bs->idx = BOOT_STATUS_IDX_0; - 284e: 6003 str r3, [r0, #0] + 28ae: 6003 str r3, [r0, #0] bs->state = BOOT_STATUS_STATE_0; - 2850: 7103 strb r3, [r0, #4] + 28b0: 7103 strb r3, [r0, #4] bs->swap_type = BOOT_SWAP_TYPE_NONE; - 2852: 71c3 strb r3, [r0, #7] + 28b2: 71c3 strb r3, [r0, #7] } - 2854: 4770 bx lr + 28b4: 4770 bx lr -00002856 : +000028b6 : return (bs->op == BOOT_STATUS_OP_MOVE && - 2856: 7943 ldrb r3, [r0, #5] + 28b6: 7943 ldrb r3, [r0, #5] bs->idx == BOOT_STATUS_IDX_0 && - 2858: 2b01 cmp r3, #1 - 285a: d001 beq.n 2860 - 285c: 2000 movs r0, #0 - 285e: 4770 bx lr - 2860: 6803 ldr r3, [r0, #0] + 28b8: 2b01 cmp r3, #1 + 28ba: d001 beq.n 28c0 + 28bc: 2000 movs r0, #0 + 28be: 4770 bx lr + 28c0: 6803 ldr r3, [r0, #0] return (bs->op == BOOT_STATUS_OP_MOVE && - 2862: 2b01 cmp r3, #1 - 2864: d001 beq.n 286a + 28c2: 2b01 cmp r3, #1 + 28c4: d001 beq.n 28ca bs->idx == BOOT_STATUS_IDX_0 && - 2866: 2000 movs r0, #0 - 2868: 4770 bx lr + 28c6: 2000 movs r0, #0 + 28c8: 4770 bx lr bs->state == BOOT_STATUS_STATE_0); - 286a: 7903 ldrb r3, [r0, #4] + 28ca: 7903 ldrb r3, [r0, #4] bs->idx == BOOT_STATUS_IDX_0 && - 286c: 2b01 cmp r3, #1 - 286e: d001 beq.n 2874 - 2870: 2000 movs r0, #0 - 2872: 4770 bx lr - 2874: 2001 movs r0, #1 + 28cc: 2b01 cmp r3, #1 + 28ce: d001 beq.n 28d4 + 28d0: 2000 movs r0, #0 + 28d2: 4770 bx lr + 28d4: 2001 movs r0, #1 } - 2876: 4770 bx lr + 28d6: 4770 bx lr -00002878 : +000028d8 : * * @return 0 on success; nonzero on failure. */ static int boot_swap_image(struct boot_loader_state *state, struct boot_status *bs) { - 2878: b530 push {r4, r5, lr} - 287a: b083 sub sp, #12 - 287c: 4605 mov r5, r0 - 287e: 460c mov r4, r1 + 28d8: b530 push {r4, r5, lr} + 28da: b083 sub sp, #12 + 28dc: 4605 mov r5, r0 + 28de: 460c mov r4, r1 uint8_t image_index; int rc; /* FIXME: just do this if asked by user? */ size = copy_size = 0; - 2880: 2300 movs r3, #0 - 2882: 9300 str r3, [sp, #0] - 2884: 9301 str r3, [sp, #4] + 28e0: 2300 movs r3, #0 + 28e2: 9300 str r3, [sp, #0] + 28e4: 9301 str r3, [sp, #4] image_index = BOOT_CURR_IMG(state); if (boot_status_is_reset(bs)) { - 2886: 4608 mov r0, r1 - 2888: f7ff ffe5 bl 2856 - 288c: 2800 cmp r0, #0 - 288e: d030 beq.n 28f2 + 28e6: 4608 mov r0, r1 + 28e8: f7ff ffe5 bl 28b6 + 28ec: 2800 cmp r0, #0 + 28ee: d030 beq.n 2952 /* * No swap ever happened, so need to find the largest image which * will be used to determine the amount of sectors to swap. */ hdr = boot_img_hdr(state, BOOT_PRIMARY_SLOT); if (hdr->ih_magic == IMAGE_MAGIC) { - 2890: 682a ldr r2, [r5, #0] - 2892: 4b1f ldr r3, [pc, #124] ; (2910 ) - 2894: 429a cmp r2, r3 - 2896: d012 beq.n 28be + 28f0: 682a ldr r2, [r5, #0] + 28f2: 4b1f ldr r3, [pc, #124] ; (2970 ) + 28f4: 429a cmp r2, r3 + 28f6: d012 beq.n 291e memset(bs->enckey[0], 0xff, BOOT_ENC_KEY_SIZE); } #endif hdr = boot_img_hdr(state, BOOT_SECONDARY_SLOT); if (hdr->ih_magic == IMAGE_MAGIC) { - 2898: 6aea ldr r2, [r5, #44] ; 0x2c - 289a: 4b1d ldr r3, [pc, #116] ; (2910 ) - 289c: 429a cmp r2, r3 - 289e: d01b beq.n 28d8 + 28f8: 6aea ldr r2, [r5, #44] ; 0x2c + 28fa: 4b1d ldr r3, [pc, #116] ; (2970 ) + 28fc: 429a cmp r2, r3 + 28fe: d01b beq.n 2938 } else { memset(bs->enckey[1], 0xff, BOOT_ENC_KEY_SIZE); } #endif if (size > copy_size) { - 28a0: 9b01 ldr r3, [sp, #4] - 28a2: 9a00 ldr r2, [sp, #0] - 28a4: 4293 cmp r3, r2 - 28a6: d900 bls.n 28aa + 2900: 9b01 ldr r3, [sp, #4] + 2902: 9a00 ldr r2, [sp, #0] + 2904: 4293 cmp r3, r2 + 2906: d900 bls.n 290a copy_size = size; - 28a8: 9300 str r3, [sp, #0] + 2908: 9300 str r3, [sp, #0] } bs->swap_size = copy_size; - 28aa: 9b00 ldr r3, [sp, #0] - 28ac: 60a3 str r3, [r4, #8] + 290a: 9b00 ldr r3, [sp, #0] + 290c: 60a3 str r3, [r4, #8] } } #endif } swap_run(state, bs, copy_size); - 28ae: 9a00 ldr r2, [sp, #0] - 28b0: 4621 mov r1, r4 - 28b2: 4628 mov r0, r5 - 28b4: f000 fe60 bl 3578 + 290e: 9a00 ldr r2, [sp, #0] + 2910: 4621 mov r1, r4 + 2912: 4628 mov r0, r5 + 2914: f000 fe60 bl 35d8 boot_status_fails); } #endif return 0; } - 28b8: 2000 movs r0, #0 - 28ba: b003 add sp, #12 - 28bc: bd30 pop {r4, r5, pc} + 2918: 2000 movs r0, #0 + 291a: b003 add sp, #12 + 291c: bd30 pop {r4, r5, pc} rc = boot_read_image_size(state, BOOT_PRIMARY_SLOT, ©_size); - 28be: 466a mov r2, sp - 28c0: 2100 movs r1, #0 - 28c2: 4628 mov r0, r5 - 28c4: f7ff fe66 bl 2594 + 291e: 466a mov r2, sp + 2920: 2100 movs r1, #0 + 2922: 4628 mov r0, r5 + 2924: f7ff fe66 bl 25f4 assert(rc == 0); - 28c8: 2800 cmp r0, #0 - 28ca: d0e5 beq.n 2898 - 28cc: 2300 movs r3, #0 - 28ce: 461a mov r2, r3 - 28d0: 4619 mov r1, r3 - 28d2: 4618 mov r0, r3 - 28d4: f7fe ff1a bl 170c <__assert_func> + 2928: 2800 cmp r0, #0 + 292a: d0e5 beq.n 28f8 + 292c: 2300 movs r3, #0 + 292e: 461a mov r2, r3 + 2930: 4619 mov r1, r3 + 2932: 4618 mov r0, r3 + 2934: f7fe feea bl 170c <__assert_func> rc = boot_read_image_size(state, BOOT_SECONDARY_SLOT, &size); - 28d8: aa01 add r2, sp, #4 - 28da: 2101 movs r1, #1 - 28dc: 4628 mov r0, r5 - 28de: f7ff fe59 bl 2594 + 2938: aa01 add r2, sp, #4 + 293a: 2101 movs r1, #1 + 293c: 4628 mov r0, r5 + 293e: f7ff fe59 bl 25f4 assert(rc == 0); - 28e2: 2800 cmp r0, #0 - 28e4: d0dc beq.n 28a0 - 28e6: 2300 movs r3, #0 - 28e8: 461a mov r2, r3 - 28ea: 4619 mov r1, r3 - 28ec: 4618 mov r0, r3 - 28ee: f7fe ff0d bl 170c <__assert_func> + 2942: 2800 cmp r0, #0 + 2944: d0dc beq.n 2900 + 2946: 2300 movs r3, #0 + 2948: 461a mov r2, r3 + 294a: 4619 mov r1, r3 + 294c: 4618 mov r0, r3 + 294e: f7fe fedd bl 170c <__assert_func> rc = boot_read_swap_size(image_index, &bs->swap_size); - 28f2: f104 0108 add.w r1, r4, #8 - 28f6: 2000 movs r0, #0 - 28f8: f000 ffac bl 3854 + 2952: f104 0108 add.w r1, r4, #8 + 2956: 2000 movs r0, #0 + 2958: f000 ffac bl 38b4 assert(rc == 0); - 28fc: b910 cbnz r0, 2904 + 295c: b910 cbnz r0, 2964 copy_size = bs->swap_size; - 28fe: 68a3 ldr r3, [r4, #8] - 2900: 9300 str r3, [sp, #0] - 2902: e7d4 b.n 28ae + 295e: 68a3 ldr r3, [r4, #8] + 2960: 9300 str r3, [sp, #0] + 2962: e7d4 b.n 290e assert(rc == 0); - 2904: 2300 movs r3, #0 - 2906: 461a mov r2, r3 - 2908: 4619 mov r1, r3 - 290a: 4618 mov r0, r3 - 290c: f7fe fefe bl 170c <__assert_func> - 2910: 96f3b83d .word 0x96f3b83d - -00002914 : + 2964: 2300 movs r3, #0 + 2966: 461a mov r2, r3 + 2968: 4619 mov r1, r3 + 296a: 4618 mov r0, r3 + 296c: f7fe fece bl 170c <__assert_func> + 2970: 96f3b83d .word 0x96f3b83d + +00002974 : */ #if !defined(MCUBOOT_OVERWRITE_ONLY) static int boot_complete_partial_swap(struct boot_loader_state *state, struct boot_status *bs) { - 2914: b538 push {r3, r4, r5, lr} - 2916: 4605 mov r5, r0 - 2918: 460c mov r4, r1 + 2974: b538 push {r3, r4, r5, lr} + 2976: 4605 mov r5, r0 + 2978: 460c mov r4, r1 int rc; /* Determine the type of swap operation being resumed from the * `swap-type` trailer field. */ rc = boot_swap_image(state, bs); - 291a: f7ff ffad bl 2878 + 297a: f7ff ffad bl 28d8 assert(rc == 0); - 291e: b9a8 cbnz r0, 294c - 2920: 4602 mov r2, r0 + 297e: b9a8 cbnz r0, 29ac + 2980: 4602 mov r2, r0 BOOT_SWAP_TYPE(state) = bs->swap_type; - 2922: 79e3 ldrb r3, [r4, #7] - 2924: f885 3064 strb.w r3, [r5, #100] ; 0x64 + 2982: 79e3 ldrb r3, [r4, #7] + 2984: f885 3064 strb.w r3, [r5, #100] ; 0x64 /* The following states need image_ok be explicitly set after the * swap was finished to avoid a new revert. */ if (bs->swap_type == BOOT_SWAP_TYPE_REVERT || - 2928: 79e3 ldrb r3, [r4, #7] - 292a: 3b03 subs r3, #3 - 292c: b2db uxtb r3, r3 - 292e: 2b01 cmp r3, #1 - 2930: d912 bls.n 2958 + 2988: 79e3 ldrb r3, [r4, #7] + 298a: 3b03 subs r3, #3 + 298c: b2db uxtb r3, r3 + 298e: 2b01 cmp r3, #1 + 2990: d912 bls.n 29b8 if (rc != 0) { BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; } } if (BOOT_IS_UPGRADE(bs->swap_type)) { - 2932: 79e3 ldrb r3, [r4, #7] - 2934: 2b02 cmp r3, #2 - 2936: d019 beq.n 296c - 2938: 2b04 cmp r3, #4 - 293a: d017 beq.n 296c - 293c: 2b03 cmp r3, #3 - 293e: d015 beq.n 296c + 2992: 79e3 ldrb r3, [r4, #7] + 2994: 2b02 cmp r3, #2 + 2996: d019 beq.n 29cc + 2998: 2b04 cmp r3, #4 + 299a: d017 beq.n 29cc + 299c: 2b03 cmp r3, #3 + 299e: d015 beq.n 29cc if (rc != 0) { BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; } } if (BOOT_SWAP_TYPE(state) == BOOT_SWAP_TYPE_PANIC) { - 2940: f895 3064 ldrb.w r3, [r5, #100] ; 0x64 - 2944: 2bff cmp r3, #255 ; 0xff - 2946: d01b beq.n 2980 + 29a0: f895 3064 ldrb.w r3, [r5, #100] ; 0x64 + 29a4: 2bff cmp r3, #255 ; 0xff + 29a6: d01b beq.n 29e0 /* Loop forever... */ while (1) {} } return rc; } - 2948: 4610 mov r0, r2 - 294a: bd38 pop {r3, r4, r5, pc} + 29a8: 4610 mov r0, r2 + 29aa: bd38 pop {r3, r4, r5, pc} assert(rc == 0); - 294c: 2300 movs r3, #0 - 294e: 461a mov r2, r3 - 2950: 4619 mov r1, r3 - 2952: 4618 mov r0, r3 - 2954: f7fe feda bl 170c <__assert_func> + 29ac: 2300 movs r3, #0 + 29ae: 461a mov r2, r3 + 29b0: 4619 mov r1, r3 + 29b2: 4618 mov r0, r3 + 29b4: f7fe feaa bl 170c <__assert_func> rc = swap_set_image_ok(BOOT_CURR_IMG(state)); - 2958: 2000 movs r0, #0 - 295a: f000 fa9b bl 2e94 + 29b8: 2000 movs r0, #0 + 29ba: f000 fa9b bl 2ef4 if (rc != 0) { - 295e: 4602 mov r2, r0 - 2960: 2800 cmp r0, #0 - 2962: d0e6 beq.n 2932 + 29be: 4602 mov r2, r0 + 29c0: 2800 cmp r0, #0 + 29c2: d0e6 beq.n 2992 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; - 2964: 23ff movs r3, #255 ; 0xff - 2966: f885 3064 strb.w r3, [r5, #100] ; 0x64 - 296a: e7e2 b.n 2932 + 29c4: 23ff movs r3, #255 ; 0xff + 29c6: f885 3064 strb.w r3, [r5, #100] ; 0x64 + 29ca: e7e2 b.n 2992 rc = swap_set_copy_done(BOOT_CURR_IMG(state)); - 296c: 2000 movs r0, #0 - 296e: f000 fa82 bl 2e76 + 29cc: 2000 movs r0, #0 + 29ce: f000 fa82 bl 2ed6 if (rc != 0) { - 2972: 4602 mov r2, r0 - 2974: 2800 cmp r0, #0 - 2976: d0e3 beq.n 2940 + 29d2: 4602 mov r2, r0 + 29d4: 2800 cmp r0, #0 + 29d6: d0e3 beq.n 29a0 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; - 2978: 23ff movs r3, #255 ; 0xff - 297a: f885 3064 strb.w r3, [r5, #100] ; 0x64 - 297e: e7df b.n 2940 + 29d8: 23ff movs r3, #255 ; 0xff + 29da: f885 3064 strb.w r3, [r5, #100] ; 0x64 + 29de: e7df b.n 29a0 BOOT_LOG_ERR("panic!"); - 2980: 4804 ldr r0, [pc, #16] ; (2994 ) - 2982: f001 fccf bl 4324 + 29e0: 4804 ldr r0, [pc, #16] ; (29f4 ) + 29e2: f001 fccf bl 4384 assert(0); - 2986: 2300 movs r3, #0 - 2988: 461a mov r2, r3 - 298a: 4619 mov r1, r3 - 298c: 4618 mov r0, r3 - 298e: f7fe febd bl 170c <__assert_func> - 2992: bf00 nop - 2994: 00005394 .word 0x00005394 - -00002998 : -{ - 2998: b538 push {r3, r4, r5, lr} - 299a: 4605 mov r5, r0 + 29e6: 2300 movs r3, #0 + 29e8: 461a mov r2, r3 + 29ea: 4619 mov r1, r3 + 29ec: 4618 mov r0, r3 + 29ee: f7fe fe8d bl 170c <__assert_func> + 29f2: bf00 nop + 29f4: 0000543c .word 0x0000543c + +000029f8 : +{ + 29f8: b538 push {r3, r4, r5, lr} + 29fa: 4605 mov r5, r0 rc = boot_swap_image(state, bs); - 299c: f7ff ff6c bl 2878 + 29fc: f7ff ff6c bl 28d8 assert(rc == 0); - 29a0: b9b0 cbnz r0, 29d0 - 29a2: 4602 mov r2, r0 + 2a00: b9b0 cbnz r0, 2a30 + 2a02: 4602 mov r2, r0 swap_type = BOOT_SWAP_TYPE(state); - 29a4: f895 4064 ldrb.w r4, [r5, #100] ; 0x64 + 2a04: f895 4064 ldrb.w r4, [r5, #100] ; 0x64 if (swap_type == BOOT_SWAP_TYPE_REVERT || - 29a8: 1ee3 subs r3, r4, #3 - 29aa: b2db uxtb r3, r3 - 29ac: 2b01 cmp r3, #1 - 29ae: d915 bls.n 29dc + 2a08: 1ee3 subs r3, r4, #3 + 2a0a: b2db uxtb r3, r3 + 2a0c: 2b01 cmp r3, #1 + 2a0e: d915 bls.n 2a3c if (BOOT_IS_UPGRADE(swap_type)) { - 29b0: 2c02 cmp r4, #2 - 29b2: d003 beq.n 29bc - 29b4: 2c04 cmp r4, #4 - 29b6: d001 beq.n 29bc - 29b8: 2c03 cmp r4, #3 - 29ba: d107 bne.n 29cc + 2a10: 2c02 cmp r4, #2 + 2a12: d003 beq.n 2a1c + 2a14: 2c04 cmp r4, #4 + 2a16: d001 beq.n 2a1c + 2a18: 2c03 cmp r4, #3 + 2a1a: d107 bne.n 2a2c rc = swap_set_copy_done(BOOT_CURR_IMG(state)); - 29bc: 2000 movs r0, #0 - 29be: f000 fa5a bl 2e76 + 2a1c: 2000 movs r0, #0 + 2a1e: f000 fa5a bl 2ed6 if (rc != 0) { - 29c2: 4602 mov r2, r0 - 29c4: b110 cbz r0, 29cc + 2a22: 4602 mov r2, r0 + 2a24: b110 cbz r0, 2a2c BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; - 29c6: 23ff movs r3, #255 ; 0xff - 29c8: f885 3064 strb.w r3, [r5, #100] ; 0x64 + 2a26: 23ff movs r3, #255 ; 0xff + 2a28: f885 3064 strb.w r3, [r5, #100] ; 0x64 } - 29cc: 4610 mov r0, r2 - 29ce: bd38 pop {r3, r4, r5, pc} + 2a2c: 4610 mov r0, r2 + 2a2e: bd38 pop {r3, r4, r5, pc} assert(rc == 0); - 29d0: 2300 movs r3, #0 - 29d2: 461a mov r2, r3 - 29d4: 4619 mov r1, r3 - 29d6: 4618 mov r0, r3 - 29d8: f7fe fe98 bl 170c <__assert_func> + 2a30: 2300 movs r3, #0 + 2a32: 461a mov r2, r3 + 2a34: 4619 mov r1, r3 + 2a36: 4618 mov r0, r3 + 2a38: f7fe fe68 bl 170c <__assert_func> rc = swap_set_image_ok(BOOT_CURR_IMG(state)); - 29dc: 2000 movs r0, #0 - 29de: f000 fa59 bl 2e94 + 2a3c: 2000 movs r0, #0 + 2a3e: f000 fa59 bl 2ef4 if (rc != 0) { - 29e2: 4602 mov r2, r0 - 29e4: 2800 cmp r0, #0 - 29e6: d0e3 beq.n 29b0 + 2a42: 4602 mov r2, r0 + 2a44: 2800 cmp r0, #0 + 2a46: d0e3 beq.n 2a10 BOOT_SWAP_TYPE(state) = swap_type = BOOT_SWAP_TYPE_PANIC; - 29e8: 24ff movs r4, #255 ; 0xff - 29ea: f885 4064 strb.w r4, [r5, #100] ; 0x64 - 29ee: e7e1 b.n 29b4 + 2a48: 24ff movs r4, #255 ; 0xff + 2a4a: f885 4064 strb.w r4, [r5, #100] ; 0x64 + 2a4e: e7e1 b.n 2a14 -000029f0 : +00002a50 : * boot status can be written to. */ static void boot_prepare_image_for_update(struct boot_loader_state *state, struct boot_status *bs) { - 29f0: b538 push {r3, r4, r5, lr} - 29f2: 4604 mov r4, r0 - 29f4: 460d mov r5, r1 + 2a50: b538 push {r3, r4, r5, lr} + 2a52: 4604 mov r4, r0 + 2a54: 460d mov r5, r1 int rc; /* Determine the sector layout of the image slots and scratch area. */ rc = boot_read_sectors(state); - 29f6: f7ff fe69 bl 26cc + 2a56: f7ff fe69 bl 272c if (rc != 0) { - 29fa: b968 cbnz r0, 2a18 + 2a5a: b968 cbnz r0, 2a78 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE; return; } /* Attempt to read an image header from each slot. */ rc = boot_read_image_headers(state, false, NULL); - 29fc: 2200 movs r2, #0 - 29fe: 4611 mov r1, r2 - 2a00: 4620 mov r0, r4 - 2a02: f7ff ff03 bl 280c + 2a5c: 2200 movs r2, #0 + 2a5e: 4611 mov r1, r2 + 2a60: 4620 mov r0, r4 + 2a62: f7ff ff03 bl 286c if (rc != 0) { - 2a06: b978 cbnz r0, 2a28 + 2a66: b978 cbnz r0, 2a88 } /* If the current image's slots aren't compatible, no swap is possible. * Just boot into primary slot. */ if (boot_slots_compatible(state)) { - 2a08: 4620 mov r0, r4 - 2a0a: f000 fc97 bl 333c - 2a0e: b998 cbnz r0, 2a38 + 2a68: 4620 mov r0, r4 + 2a6a: f000 fc97 bl 339c + 2a6e: b998 cbnz r0, 2a98 } #endif } } else { /* In that case if slots are not compatible. */ BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE; - 2a10: 2301 movs r3, #1 - 2a12: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 2a16: e006 b.n 2a26 + 2a70: 2301 movs r3, #1 + 2a72: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2a76: e006 b.n 2a86 BOOT_LOG_WRN("Failed reading sectors; BOOT_MAX_IMG_SECTORS=%d" - 2a18: 2180 movs r1, #128 ; 0x80 - 2a1a: 482b ldr r0, [pc, #172] ; (2ac8 ) - 2a1c: f001 ff58 bl 48d0 + 2a78: 2180 movs r1, #128 ; 0x80 + 2a7a: 482b ldr r0, [pc, #172] ; (2b28 ) + 2a7c: f001 ff58 bl 4930 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE; - 2a20: 2301 movs r3, #1 - 2a22: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2a80: 2301 movs r3, #1 + 2a82: f884 3064 strb.w r3, [r4, #100] ; 0x64 } } - 2a26: bd38 pop {r3, r4, r5, pc} + 2a86: bd38 pop {r3, r4, r5, pc} BOOT_LOG_WRN("Failed reading image headers; Image=%u", - 2a28: 2100 movs r1, #0 - 2a2a: 4828 ldr r0, [pc, #160] ; (2acc ) - 2a2c: f001 ff50 bl 48d0 + 2a88: 2100 movs r1, #0 + 2a8a: 4828 ldr r0, [pc, #160] ; (2b2c ) + 2a8c: f001 ff50 bl 4930 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE; - 2a30: 2301 movs r3, #1 - 2a32: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2a90: 2301 movs r3, #1 + 2a92: f884 3064 strb.w r3, [r4, #100] ; 0x64 return; - 2a36: e7f6 b.n 2a26 + 2a96: e7f6 b.n 2a86 boot_status_reset(bs); - 2a38: 4628 mov r0, r5 - 2a3a: f7ff ff02 bl 2842 + 2a98: 4628 mov r0, r5 + 2a9a: f7ff ff02 bl 28a2 rc = swap_read_status(state, bs); - 2a3e: 4629 mov r1, r5 - 2a40: 4620 mov r0, r4 - 2a42: f000 f9da bl 2dfa + 2a9e: 4629 mov r1, r5 + 2aa0: 4620 mov r0, r4 + 2aa2: f000 f9da bl 2e5a if (rc != 0) { - 2a46: b980 cbnz r0, 2a6a + 2aa6: b980 cbnz r0, 2aca if (!boot_status_is_reset(bs)) { - 2a48: 4628 mov r0, r5 - 2a4a: f7ff ff04 bl 2856 - 2a4e: b1a0 cbz r0, 2a7a + 2aa8: 4628 mov r0, r5 + 2aaa: f7ff ff04 bl 28b6 + 2aae: b1a0 cbz r0, 2ada if (bs->swap_type == BOOT_SWAP_TYPE_NONE) { - 2a50: 79eb ldrb r3, [r5, #7] - 2a52: 2b01 cmp r3, #1 - 2a54: d02c beq.n 2ab0 + 2ab0: 79eb ldrb r3, [r5, #7] + 2ab2: 2b01 cmp r3, #1 + 2ab4: d02c beq.n 2b10 } else if (boot_validate_slot(state, BOOT_SECONDARY_SLOT, bs) != 0) { - 2a56: 462a mov r2, r5 - 2a58: 2101 movs r1, #1 - 2a5a: 4620 mov r0, r4 - 2a5c: f7ff fe6e bl 273c - 2a60: b368 cbz r0, 2abe + 2ab6: 462a mov r2, r5 + 2ab8: 2101 movs r1, #1 + 2aba: 4620 mov r0, r4 + 2abc: f7ff fe6e bl 279c + 2ac0: b368 cbz r0, 2b1e BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_FAIL; - 2a62: 2305 movs r3, #5 - 2a64: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 2a68: e7dd b.n 2a26 + 2ac2: 2305 movs r3, #5 + 2ac4: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2ac8: e7dd b.n 2a86 BOOT_LOG_WRN("Failed reading boot status; Image=%u", - 2a6a: 2100 movs r1, #0 - 2a6c: 4818 ldr r0, [pc, #96] ; (2ad0 ) - 2a6e: f001 ff2f bl 48d0 + 2aca: 2100 movs r1, #0 + 2acc: 4818 ldr r0, [pc, #96] ; (2b30 ) + 2ace: f001 ff2f bl 4930 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE; - 2a72: 2301 movs r3, #1 - 2a74: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2ad2: 2301 movs r3, #1 + 2ad4: f884 3064 strb.w r3, [r4, #100] ; 0x64 return; - 2a78: e7d5 b.n 2a26 + 2ad8: e7d5 b.n 2a86 rc = boot_complete_partial_swap(state, bs); - 2a7a: 4629 mov r1, r5 - 2a7c: 4620 mov r0, r4 - 2a7e: f7ff ff49 bl 2914 + 2ada: 4629 mov r1, r5 + 2adc: 4620 mov r0, r4 + 2ade: f7ff ff49 bl 2974 assert(rc == 0); - 2a82: b948 cbnz r0, 2a98 + 2ae2: b948 cbnz r0, 2af8 rc = boot_read_image_headers(state, false, bs); - 2a84: 462a mov r2, r5 - 2a86: 2100 movs r1, #0 - 2a88: 4620 mov r0, r4 - 2a8a: f7ff febf bl 280c + 2ae4: 462a mov r2, r5 + 2ae6: 2100 movs r1, #0 + 2ae8: 4620 mov r0, r4 + 2aea: f7ff febf bl 286c assert(rc == 0); - 2a8e: b948 cbnz r0, 2aa4 + 2aee: b948 cbnz r0, 2b04 BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE; - 2a90: 2301 movs r3, #1 - 2a92: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 2a96: e7c6 b.n 2a26 + 2af0: 2301 movs r3, #1 + 2af2: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2af6: e7c6 b.n 2a86 assert(rc == 0); - 2a98: 2300 movs r3, #0 - 2a9a: 461a mov r2, r3 - 2a9c: 4619 mov r1, r3 - 2a9e: 4618 mov r0, r3 - 2aa0: f7fe fe34 bl 170c <__assert_func> + 2af8: 2300 movs r3, #0 + 2afa: 461a mov r2, r3 + 2afc: 4619 mov r1, r3 + 2afe: 4618 mov r0, r3 + 2b00: f7fe fe04 bl 170c <__assert_func> assert(rc == 0); - 2aa4: 2300 movs r3, #0 - 2aa6: 461a mov r2, r3 - 2aa8: 4619 mov r1, r3 - 2aaa: 4618 mov r0, r3 - 2aac: f7fe fe2e bl 170c <__assert_func> + 2b04: 2300 movs r3, #0 + 2b06: 461a mov r2, r3 + 2b08: 4619 mov r1, r3 + 2b0a: 4618 mov r0, r3 + 2b0c: f7fe fdfe bl 170c <__assert_func> BOOT_SWAP_TYPE(state) = boot_validated_swap_type(state, bs); - 2ab0: 4629 mov r1, r5 - 2ab2: 4620 mov r0, r4 - 2ab4: f7ff fe8e bl 27d4 - 2ab8: f884 0064 strb.w r0, [r4, #100] ; 0x64 - 2abc: e7b3 b.n 2a26 + 2b10: 4629 mov r1, r5 + 2b12: 4620 mov r0, r4 + 2b14: f7ff fe8e bl 2834 + 2b18: f884 0064 strb.w r0, [r4, #100] ; 0x64 + 2b1c: e7b3 b.n 2a86 BOOT_SWAP_TYPE(state) = bs->swap_type; - 2abe: 79eb ldrb r3, [r5, #7] - 2ac0: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 2ac4: e7af b.n 2a26 - 2ac6: bf00 nop - 2ac8: 000053a4 .word 0x000053a4 - 2acc: 000053e8 .word 0x000053e8 - 2ad0: 00005418 .word 0x00005418 - -00002ad4 : -{ - 2ad4: b570 push {r4, r5, r6, lr} - 2ad6: b084 sub sp, #16 - 2ad8: 4606 mov r6, r0 - 2ada: 460c mov r4, r1 + 2b1e: 79eb ldrb r3, [r5, #7] + 2b20: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2b24: e7af b.n 2a86 + 2b26: bf00 nop + 2b28: 0000544c .word 0x0000544c + 2b2c: 00005490 .word 0x00005490 + 2b30: 000054c0 .word 0x000054c0 + +00002b34 : +{ + 2b34: b570 push {r4, r5, r6, lr} + 2b36: b084 sub sp, #16 + 2b38: 4606 mov r6, r0 + 2b3a: 460c mov r4, r1 if (bs->use_scratch) { - 2adc: 798b ldrb r3, [r1, #6] - 2ade: b143 cbz r3, 2af2 + 2b3c: 798b ldrb r3, [r1, #6] + 2b3e: b143 cbz r3, 2b52 area_id = FLASH_AREA_IMAGE_SCRATCH; - 2ae0: 2003 movs r0, #3 + 2b40: 2003 movs r0, #3 rc = flash_area_open(area_id, &fap); - 2ae2: a903 add r1, sp, #12 - 2ae4: f001 ff4c bl 4980 + 2b42: a903 add r1, sp, #12 + 2b44: f001 ff4c bl 49e0 if (rc != 0) { - 2ae8: b128 cbz r0, 2af6 + 2b48: b128 cbz r0, 2b56 rc = BOOT_EFLASH; - 2aea: 2301 movs r3, #1 + 2b4a: 2301 movs r3, #1 } - 2aec: 4618 mov r0, r3 - 2aee: b004 add sp, #16 - 2af0: bd70 pop {r4, r5, r6, pc} + 2b4c: 4618 mov r0, r3 + 2b4e: b004 add sp, #16 + 2b50: bd70 pop {r4, r5, r6, pc} area_id = FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state)); - 2af2: 2001 movs r0, #1 - 2af4: e7f5 b.n 2ae2 + 2b52: 2001 movs r0, #1 + 2b54: e7f5 b.n 2b42 off = boot_status_off(fap) + - 2af6: 9803 ldr r0, [sp, #12] - 2af8: f000 fe28 bl 374c - 2afc: 4605 mov r5, r0 + 2b56: 9803 ldr r0, [sp, #12] + 2b58: f000 fe28 bl 37ac + 2b5c: 4605 mov r5, r0 boot_status_internal_off(bs, BOOT_WRITE_SZ(state)); - 2afe: 6eb1 ldr r1, [r6, #104] ; 0x68 - 2b00: 4620 mov r0, r4 - 2b02: f000 fc0d bl 3320 + 2b5e: 6eb1 ldr r1, [r6, #104] ; 0x68 + 2b60: 4620 mov r0, r4 + 2b62: f000 fc0d bl 3380 off = boot_status_off(fap) + - 2b06: 4405 add r5, r0 + 2b66: 4405 add r5, r0 align = flash_area_align(fap); - 2b08: 9803 ldr r0, [sp, #12] - 2b0a: f001 ffd0 bl 4aae - 2b0e: 4606 mov r6, r0 + 2b68: 9803 ldr r0, [sp, #12] + 2b6a: f001 ffd0 bl 4b0e + 2b6e: 4606 mov r6, r0 erased_val = flash_area_erased_val(fap); - 2b10: 9803 ldr r0, [sp, #12] - 2b12: f001 ffd1 bl 4ab8 + 2b70: 9803 ldr r0, [sp, #12] + 2b72: f001 ffd1 bl 4b18 memset(buf, erased_val, BOOT_MAX_ALIGN); - 2b16: 2208 movs r2, #8 - 2b18: b2c1 uxtb r1, r0 - 2b1a: a801 add r0, sp, #4 - 2b1c: f7ff f95a bl 1dd4 + 2b76: 2208 movs r2, #8 + 2b78: b2c1 uxtb r1, r0 + 2b7a: a801 add r0, sp, #4 + 2b7c: f7ff f92a bl 1dd4 buf[0] = bs->state; - 2b20: 7923 ldrb r3, [r4, #4] - 2b22: f88d 3004 strb.w r3, [sp, #4] + 2b80: 7923 ldrb r3, [r4, #4] + 2b82: f88d 3004 strb.w r3, [sp, #4] rc = flash_area_write(fap, off, buf, align); - 2b26: 4633 mov r3, r6 - 2b28: aa01 add r2, sp, #4 - 2b2a: 4629 mov r1, r5 - 2b2c: 9803 ldr r0, [sp, #12] - 2b2e: f001 ff98 bl 4a62 + 2b86: 4633 mov r3, r6 + 2b88: aa01 add r2, sp, #4 + 2b8a: 4629 mov r1, r5 + 2b8c: 9803 ldr r0, [sp, #12] + 2b8e: f001 ff98 bl 4ac2 if (rc != 0) { - 2b32: 4603 mov r3, r0 - 2b34: 2800 cmp r0, #0 - 2b36: d0d9 beq.n 2aec + 2b92: 4603 mov r3, r0 + 2b94: 2800 cmp r0, #0 + 2b96: d0d9 beq.n 2b4c rc = BOOT_EFLASH; - 2b38: 2301 movs r3, #1 - 2b3a: e7d7 b.n 2aec + 2b98: 2301 movs r3, #1 + 2b9a: e7d7 b.n 2b4c -00002b3c : +00002b9c : { - 2b3c: b508 push {r3, lr} + 2b9c: b508 push {r3, lr} return flash_area_erase(fap, off, sz); - 2b3e: f001 ffa3 bl 4a88 + 2b9e: f001 ffa3 bl 4ae8 } - 2b42: bd08 pop {r3, pc} + 2ba2: bd08 pop {r3, pc} -00002b44 : +00002ba4 : { - 2b44: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} - 2b48: 4688 mov r8, r1 - 2b4a: 4692 mov sl, r2 - 2b4c: 461f mov r7, r3 - 2b4e: f8dd 9028 ldr.w r9, [sp, #40] ; 0x28 - 2b52: 9e0b ldr r6, [sp, #44] ; 0x2c + 2ba4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} + 2ba8: 4688 mov r8, r1 + 2baa: 4692 mov sl, r2 + 2bac: 461f mov r7, r3 + 2bae: f8dd 9028 ldr.w r9, [sp, #40] ; 0x28 + 2bb2: 9e0b ldr r6, [sp, #44] ; 0x2c bytes_copied = 0; - 2b54: 2500 movs r5, #0 + 2bb4: 2500 movs r5, #0 while (bytes_copied < sz) { - 2b56: e00f b.n 2b78 + 2bb6: e00f b.n 2bd8 rc = flash_area_read(fap_src, off_src + bytes_copied, buf, chunk_sz); - 2b58: 4623 mov r3, r4 - 2b5a: 4a0f ldr r2, [pc, #60] ; (2b98 ) - 2b5c: 19e9 adds r1, r5, r7 - 2b5e: 4640 mov r0, r8 - 2b60: f001 ff6c bl 4a3c + 2bb8: 4623 mov r3, r4 + 2bba: 4a0f ldr r2, [pc, #60] ; (2bf8 ) + 2bbc: 19e9 adds r1, r5, r7 + 2bbe: 4640 mov r0, r8 + 2bc0: f001 ff6c bl 4a9c if (rc != 0) { - 2b64: b9a0 cbnz r0, 2b90 + 2bc4: b9a0 cbnz r0, 2bf0 rc = flash_area_write(fap_dst, off_dst + bytes_copied, buf, chunk_sz); - 2b66: 4623 mov r3, r4 - 2b68: 4a0b ldr r2, [pc, #44] ; (2b98 ) - 2b6a: eb05 0109 add.w r1, r5, r9 - 2b6e: 4650 mov r0, sl - 2b70: f001 ff77 bl 4a62 + 2bc6: 4623 mov r3, r4 + 2bc8: 4a0b ldr r2, [pc, #44] ; (2bf8 ) + 2bca: eb05 0109 add.w r1, r5, r9 + 2bce: 4650 mov r0, sl + 2bd0: f001 ff77 bl 4ac2 if (rc != 0) { - 2b74: b970 cbnz r0, 2b94 + 2bd4: b970 cbnz r0, 2bf4 bytes_copied += chunk_sz; - 2b76: 4425 add r5, r4 + 2bd6: 4425 add r5, r4 while (bytes_copied < sz) { - 2b78: 42b5 cmp r5, r6 - 2b7a: d206 bcs.n 2b8a + 2bd8: 42b5 cmp r5, r6 + 2bda: d206 bcs.n 2bea if (sz - bytes_copied > sizeof buf) { - 2b7c: 1b74 subs r4, r6, r5 - 2b7e: f5b4 6f80 cmp.w r4, #1024 ; 0x400 - 2b82: d9e9 bls.n 2b58 + 2bdc: 1b74 subs r4, r6, r5 + 2bde: f5b4 6f80 cmp.w r4, #1024 ; 0x400 + 2be2: d9e9 bls.n 2bb8 chunk_sz = sizeof buf; - 2b84: f44f 6480 mov.w r4, #1024 ; 0x400 - 2b88: e7e6 b.n 2b58 + 2be4: f44f 6480 mov.w r4, #1024 ; 0x400 + 2be8: e7e6 b.n 2bb8 return 0; - 2b8a: 2000 movs r0, #0 + 2bea: 2000 movs r0, #0 } - 2b8c: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} + 2bec: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} return BOOT_EFLASH; - 2b90: 2001 movs r0, #1 - 2b92: e7fb b.n 2b8c + 2bf0: 2001 movs r0, #1 + 2bf2: e7fb b.n 2bec return BOOT_EFLASH; - 2b94: 2001 movs r0, #1 - 2b96: e7f9 b.n 2b8c - 2b98: 20004c20 .word 0x20004c20 + 2bf4: 2001 movs r0, #1 + 2bf6: e7f9 b.n 2bec + 2bf8: 20004c20 .word 0x20004c20 -00002b9c : +00002bfc : int context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp) { - 2b9c: b570 push {r4, r5, r6, lr} - 2b9e: b084 sub sp, #16 - 2ba0: 4604 mov r4, r0 - 2ba2: 460e mov r6, r1 + 2bfc: b570 push {r4, r5, r6, lr} + 2bfe: b084 sub sp, #16 + 2c00: 4604 mov r4, r0 + 2c02: 460e mov r6, r1 TARGET_STATIC boot_sector_t secondary_slot_sectors[BOOT_IMAGE_NUMBER][BOOT_MAX_IMG_SECTORS]; #if MCUBOOT_SWAP_USING_SCRATCH TARGET_STATIC boot_sector_t scratch_sectors[BOOT_MAX_IMG_SECTORS]; #endif memset(state, 0, sizeof(struct boot_loader_state)); - 2ba4: 226c movs r2, #108 ; 0x6c - 2ba6: 2100 movs r1, #0 - 2ba8: f7ff f914 bl 1dd4 + 2c04: 226c movs r2, #108 ; 0x6c + 2c06: 2100 movs r1, #0 + 2c08: f7ff f8e4 bl 1dd4 boot_enc_zeroize(BOOT_CURR_ENC(state)); #endif image_index = BOOT_CURR_IMG(state); BOOT_IMG(state, BOOT_PRIMARY_SLOT).sectors = - 2bac: 4b45 ldr r3, [pc, #276] ; (2cc4 ) - 2bae: 6263 str r3, [r4, #36] ; 0x24 + 2c0c: 4b45 ldr r3, [pc, #276] ; (2d24 ) + 2c0e: 6263 str r3, [r4, #36] ; 0x24 primary_slot_sectors[image_index]; BOOT_IMG(state, BOOT_SECONDARY_SLOT).sectors = - 2bb0: 4b45 ldr r3, [pc, #276] ; (2cc8 ) - 2bb2: 6523 str r3, [r4, #80] ; 0x50 + 2c10: 4b45 ldr r3, [pc, #276] ; (2d28 ) + 2c12: 6523 str r3, [r4, #80] ; 0x50 secondary_slot_sectors[image_index]; #if MCUBOOT_SWAP_USING_SCRATCH state->scratch.sectors = scratch_sectors; - 2bb4: 4b45 ldr r3, [pc, #276] ; (2ccc ) - 2bb6: 65e3 str r3, [r4, #92] ; 0x5c + 2c14: 4b45 ldr r3, [pc, #276] ; (2d2c ) + 2c16: 65e3 str r3, [r4, #92] ; 0x5c #endif /* Open primary and secondary image areas for the duration * of this call. */ for (slot = 0; slot < BOOT_NUM_SLOTS; slot++) { - 2bb8: 2500 movs r5, #0 - 2bba: 2d01 cmp r5, #1 - 2bbc: d814 bhi.n 2be8 + 2c18: 2500 movs r5, #0 + 2c1a: 2d01 cmp r5, #1 + 2c1c: d814 bhi.n 2c48 fa_id = flash_area_id_from_multi_image_slot(image_index, slot); - 2bbe: 4629 mov r1, r5 - 2bc0: 2000 movs r0, #0 - 2bc2: f001 f87a bl 3cba + 2c1e: 4629 mov r1, r5 + 2c20: 2000 movs r0, #0 + 2c22: f001 f87a bl 3d1a rc = flash_area_open(fa_id, &BOOT_IMG_AREA(state, slot)); - 2bc6: 212c movs r1, #44 ; 0x2c - 2bc8: fb01 f105 mul.w r1, r1, r5 - 2bcc: 3120 adds r1, #32 - 2bce: 4421 add r1, r4 - 2bd0: b2c0 uxtb r0, r0 - 2bd2: f001 fed5 bl 4980 + 2c26: 212c movs r1, #44 ; 0x2c + 2c28: fb01 f105 mul.w r1, r1, r5 + 2c2c: 3120 adds r1, #32 + 2c2e: 4421 add r1, r4 + 2c30: b2c0 uxtb r0, r0 + 2c32: f001 fed5 bl 49e0 assert(rc == 0); - 2bd6: b908 cbnz r0, 2bdc + 2c36: b908 cbnz r0, 2c3c for (slot = 0; slot < BOOT_NUM_SLOTS; slot++) { - 2bd8: 3501 adds r5, #1 - 2bda: e7ee b.n 2bba + 2c38: 3501 adds r5, #1 + 2c3a: e7ee b.n 2c1a assert(rc == 0); - 2bdc: 2300 movs r3, #0 - 2bde: 461a mov r2, r3 - 2be0: 4619 mov r1, r3 - 2be2: 4618 mov r0, r3 - 2be4: f7fe fd92 bl 170c <__assert_func> + 2c3c: 2300 movs r3, #0 + 2c3e: 461a mov r2, r3 + 2c40: 4619 mov r1, r3 + 2c42: 4618 mov r0, r3 + 2c44: f7fe fd62 bl 170c <__assert_func> } #if MCUBOOT_SWAP_USING_SCRATCH rc = flash_area_open(FLASH_AREA_IMAGE_SCRATCH, - 2be8: f104 0158 add.w r1, r4, #88 ; 0x58 - 2bec: 2003 movs r0, #3 - 2bee: f001 fec7 bl 4980 + 2c48: f104 0158 add.w r1, r4, #88 ; 0x58 + 2c4c: 2003 movs r0, #3 + 2c4e: f001 fec7 bl 49e0 &BOOT_SCRATCH_AREA(state)); assert(rc == 0); - 2bf2: 4605 mov r5, r0 - 2bf4: b978 cbnz r0, 2c16 + 2c52: 4605 mov r5, r0 + 2c54: b978 cbnz r0, 2c76 #endif /* Determine swap type and complete swap if it has been aborted. */ boot_prepare_image_for_update(state, &bs); - 2bf6: 4669 mov r1, sp - 2bf8: 4620 mov r0, r4 - 2bfa: f7ff fef9 bl 29f0 + 2c56: 4669 mov r1, sp + 2c58: 4620 mov r0, r4 + 2c5a: f7ff fef9 bl 2a50 if (BOOT_IS_UPGRADE(BOOT_SWAP_TYPE(state))) { - 2bfe: f894 3064 ldrb.w r3, [r4, #100] ; 0x64 + 2c5e: f894 3064 ldrb.w r3, [r4, #100] ; 0x64 /* Indicate that swap is not aborted */ boot_status_reset(&bs); #endif /* (BOOT_IMAGE_NUMBER > 1) */ /* Set the previously determined swap type */ bs.swap_type = BOOT_SWAP_TYPE(state); - 2c02: f88d 3007 strb.w r3, [sp, #7] + 2c62: f88d 3007 strb.w r3, [sp, #7] switch (BOOT_SWAP_TYPE(state)) { - 2c06: 3b01 subs r3, #1 - 2c08: 2b04 cmp r3, #4 - 2c0a: d838 bhi.n 2c7e - 2c0c: e8df f003 tbb [pc, r3] - 2c10: 0909090f .word 0x0909090f - 2c14: 2d .byte 0x2d - 2c15: 00 .byte 0x00 + 2c66: 3b01 subs r3, #1 + 2c68: 2b04 cmp r3, #4 + 2c6a: d838 bhi.n 2cde + 2c6c: e8df f003 tbb [pc, r3] + 2c70: 0909090f .word 0x0909090f + 2c74: 2d .byte 0x2d + 2c75: 00 .byte 0x00 assert(rc == 0); - 2c16: 2300 movs r3, #0 - 2c18: 461a mov r2, r3 - 2c1a: 4619 mov r1, r3 - 2c1c: 4618 mov r0, r3 - 2c1e: f7fe fd75 bl 170c <__assert_func> + 2c76: 2300 movs r3, #0 + 2c78: 461a mov r2, r3 + 2c7a: 4619 mov r1, r3 + 2c7c: 4618 mov r0, r3 + 2c7e: f7fe fd45 bl 170c <__assert_func> break; case BOOT_SWAP_TYPE_TEST: /* fallthrough */ case BOOT_SWAP_TYPE_PERM: /* fallthrough */ case BOOT_SWAP_TYPE_REVERT: rc = boot_perform_update(state, &bs); - 2c22: 4669 mov r1, sp - 2c24: 4620 mov r0, r4 - 2c26: f7ff feb7 bl 2998 + 2c82: 4669 mov r1, sp + 2c84: 4620 mov r0, r4 + 2c86: f7ff feb7 bl 29f8 assert(rc == 0); - 2c2a: 4605 mov r5, r0 - 2c2c: b9b8 cbnz r0, 2c5e + 2c8a: 4605 mov r5, r0 + 2c8c: b9b8 cbnz r0, 2cbe default: BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; } if (BOOT_SWAP_TYPE(state) == BOOT_SWAP_TYPE_PANIC) { - 2c2e: f894 3064 ldrb.w r3, [r4, #100] ; 0x64 - 2c32: 2bff cmp r3, #255 ; 0xff - 2c34: d027 beq.n 2c86 + 2c8e: f894 3064 ldrb.w r3, [r4, #100] ; 0x64 + 2c92: 2bff cmp r3, #255 ; 0xff + 2c94: d027 beq.n 2ce6 /* Iterate over all the images. At this point all required update operations * have finished. By the end of the loop each image in the primary slot will * have been re-validated. */ IMAGES_ITER(BOOT_CURR_IMG(state)) { if (BOOT_SWAP_TYPE(state) != BOOT_SWAP_TYPE_NONE) { - 2c36: 2b01 cmp r3, #1 - 2c38: d12e bne.n 2c98 + 2c96: 2b01 cmp r3, #1 + 2c98: d12e bne.n 2cf8 #else /* Even if we're not re-validating the primary slot, we could be booting * onto an empty flash chip. At least do a basic sanity check that * the magic number on the image is OK. */ if (BOOT_IMG(state, BOOT_PRIMARY_SLOT).hdr.ih_magic != IMAGE_MAGIC) { - 2c3a: 6822 ldr r2, [r4, #0] - 2c3c: 4b24 ldr r3, [pc, #144] ; (2cd0 ) - 2c3e: 429a cmp r2, r3 - 2c40: d133 bne.n 2caa + 2c9a: 6822 ldr r2, [r4, #0] + 2c9c: 4b24 ldr r3, [pc, #144] ; (2d30 ) + 2c9e: 429a cmp r2, r3 + 2ca0: d133 bne.n 2d0a /* * Since the boot_status struct stores plaintext encryption keys, reset * them here to avoid the possibility of jumping into an image that could * easily recover them. */ memset(&bs, 0, sizeof(struct boot_status)); - 2c42: 2300 movs r3, #0 - 2c44: 9300 str r3, [sp, #0] - 2c46: 9301 str r3, [sp, #4] - 2c48: 9302 str r3, [sp, #8] - 2c4a: 9303 str r3, [sp, #12] + 2ca2: 2300 movs r3, #0 + 2ca4: 9300 str r3, [sp, #0] + 2ca6: 9301 str r3, [sp, #4] + 2ca8: 9302 str r3, [sp, #8] + 2caa: 9303 str r3, [sp, #12] rsp->br_flash_dev_id = BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT)->fa_device_id; - 2c4c: 6a23 ldr r3, [r4, #32] - 2c4e: 785b ldrb r3, [r3, #1] - 2c50: 7133 strb r3, [r6, #4] + 2cac: 6a23 ldr r3, [r4, #32] + 2cae: 785b ldrb r3, [r3, #1] + 2cb0: 7133 strb r3, [r6, #4] * Offset of the slot from the beginning of the flash device. */ static inline uint32_t boot_img_slot_off(struct boot_loader_state *state, size_t slot) { return BOOT_IMG(state, slot).area->fa_off; - 2c52: 6a23 ldr r3, [r4, #32] - 2c54: 685b ldr r3, [r3, #4] + 2cb2: 6a23 ldr r3, [r4, #32] + 2cb4: 685b ldr r3, [r3, #4] rsp->br_image_off = boot_img_slot_off(state, BOOT_PRIMARY_SLOT); - 2c56: 60b3 str r3, [r6, #8] + 2cb6: 60b3 str r3, [r6, #8] rsp->br_hdr = boot_img_hdr(state, BOOT_PRIMARY_SLOT); - 2c58: 6034 str r4, [r6, #0] + 2cb8: 6034 str r4, [r6, #0] out: IMAGES_ITER(BOOT_CURR_IMG(state)) { #if MCUBOOT_SWAP_USING_SCRATCH flash_area_close(BOOT_SCRATCH_AREA(state)); #endif for (slot = 0; slot < BOOT_NUM_SLOTS; slot++) { - 2c5a: 2300 movs r3, #0 - 2c5c: e02d b.n 2cba + 2cba: 2300 movs r3, #0 + 2cbc: e02d b.n 2d1a assert(rc == 0); - 2c5e: 2300 movs r3, #0 - 2c60: 461a mov r2, r3 - 2c62: 4619 mov r1, r3 - 2c64: 4618 mov r0, r3 - 2c66: f7fe fd51 bl 170c <__assert_func> + 2cbe: 2300 movs r3, #0 + 2cc0: 461a mov r2, r3 + 2cc2: 4619 mov r1, r3 + 2cc4: 4618 mov r0, r3 + 2cc6: f7fe fd21 bl 170c <__assert_func> rc = swap_set_image_ok(BOOT_CURR_IMG(state)); - 2c6a: 2000 movs r0, #0 - 2c6c: f000 f912 bl 2e94 + 2cca: 2000 movs r0, #0 + 2ccc: f000 f912 bl 2ef4 if (rc != 0) { - 2c70: 4605 mov r5, r0 - 2c72: 2800 cmp r0, #0 - 2c74: d0db beq.n 2c2e + 2cd0: 4605 mov r5, r0 + 2cd2: 2800 cmp r0, #0 + 2cd4: d0db beq.n 2c8e BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; - 2c76: 23ff movs r3, #255 ; 0xff - 2c78: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 2c7c: e7d7 b.n 2c2e + 2cd6: 23ff movs r3, #255 ; 0xff + 2cd8: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2cdc: e7d7 b.n 2c8e BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_PANIC; - 2c7e: 23ff movs r3, #255 ; 0xff - 2c80: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 2c84: e7d3 b.n 2c2e + 2cde: 23ff movs r3, #255 ; 0xff + 2ce0: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 2ce4: e7d3 b.n 2c8e BOOT_LOG_ERR("panic!"); - 2c86: 4813 ldr r0, [pc, #76] ; (2cd4 ) - 2c88: f001 fb4c bl 4324 + 2ce6: 4813 ldr r0, [pc, #76] ; (2d34 ) + 2ce8: f001 fb4c bl 4384 assert(0); - 2c8c: 2300 movs r3, #0 - 2c8e: 461a mov r2, r3 - 2c90: 4619 mov r1, r3 - 2c92: 4618 mov r0, r3 - 2c94: f7fe fd3a bl 170c <__assert_func> + 2cec: 2300 movs r3, #0 + 2cee: 461a mov r2, r3 + 2cf0: 4619 mov r1, r3 + 2cf2: 4618 mov r0, r3 + 2cf4: f7fe fd0a bl 170c <__assert_func> rc = boot_read_image_headers(state, false, &bs); - 2c98: 466a mov r2, sp - 2c9a: 2100 movs r1, #0 - 2c9c: 4620 mov r0, r4 - 2c9e: f7ff fdb5 bl 280c + 2cf8: 466a mov r2, sp + 2cfa: 2100 movs r1, #0 + 2cfc: 4620 mov r0, r4 + 2cfe: f7ff fdb5 bl 286c if (rc != 0) { - 2ca2: 4605 mov r5, r0 - 2ca4: 2800 cmp r0, #0 - 2ca6: d1d8 bne.n 2c5a - 2ca8: e7c7 b.n 2c3a + 2d02: 4605 mov r5, r0 + 2d04: 2800 cmp r0, #0 + 2d06: d1d8 bne.n 2cba + 2d08: e7c7 b.n 2c9a BOOT_LOG_ERR("bad image magic 0x%lx; Image=%u", (unsigned long) - 2caa: 2200 movs r2, #0 - 2cac: 4621 mov r1, r4 - 2cae: 480a ldr r0, [pc, #40] ; (2cd8 ) - 2cb0: f001 fe0e bl 48d0 + 2d0a: 2200 movs r2, #0 + 2d0c: 4621 mov r1, r4 + 2d0e: 480a ldr r0, [pc, #40] ; (2d38 ) + 2d10: f001 fe0e bl 4930 rc = BOOT_EBADIMAGE; - 2cb4: 2503 movs r5, #3 + 2d14: 2503 movs r5, #3 goto out; - 2cb6: e7d0 b.n 2c5a + 2d16: e7d0 b.n 2cba for (slot = 0; slot < BOOT_NUM_SLOTS; slot++) { - 2cb8: 3301 adds r3, #1 - 2cba: 2b01 cmp r3, #1 - 2cbc: d9fc bls.n 2cb8 + 2d18: 3301 adds r3, #1 + 2d1a: 2b01 cmp r3, #1 + 2d1c: d9fc bls.n 2d18 flash_area_close(BOOT_IMG_AREA(state, BOOT_NUM_SLOTS - 1 - slot)); } } return rc; } - 2cbe: 4628 mov r0, r5 - 2cc0: b004 add sp, #16 - 2cc2: bd70 pop {r4, r5, r6, pc} - 2cc4: 20005020 .word 0x20005020 - 2cc8: 20005c20 .word 0x20005c20 - 2ccc: 20005620 .word 0x20005620 - 2cd0: 96f3b83d .word 0x96f3b83d - 2cd4: 00005394 .word 0x00005394 - 2cd8: 00005484 .word 0x00005484 - -00002cdc : + 2d1e: 4628 mov r0, r5 + 2d20: b004 add sp, #16 + 2d22: bd70 pop {r4, r5, r6, pc} + 2d24: 20005020 .word 0x20005020 + 2d28: 20005c20 .word 0x20005c20 + 2d2c: 20005620 .word 0x20005620 + 2d30: 96f3b83d .word 0x96f3b83d + 2d34: 0000543c .word 0x0000543c + 2d38: 0000552c .word 0x0000552c + +00002d3c : * * @return 0 on success; nonzero on failure. */ int boot_go(struct boot_rsp *rsp) { - 2cdc: b508 push {r3, lr} + 2d3c: b508 push {r3, lr} return context_boot_go(&boot_data, rsp); - 2cde: 4601 mov r1, r0 - 2ce0: 4801 ldr r0, [pc, #4] ; (2ce8 ) - 2ce2: f7ff ff5b bl 2b9c + 2d3e: 4601 mov r1, r0 + 2d40: 4801 ldr r0, [pc, #4] ; (2d48 ) + 2d42: f7ff ff5b bl 2bfc } - 2ce6: bd08 pop {r3, pc} - 2ce8: 20004bb4 .word 0x20004bb4 + 2d46: bd08 pop {r3, pc} + 2d48: 20004bb4 .word 0x20004bb4 -00002cec : +00002d4c : #if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SWAP_USING_MOVE) int swap_erase_trailer_sectors(const struct boot_loader_state *state, const struct flash_area *fap) { - 2cec: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 2cf0: 4606 mov r6, r0 - 2cf2: 460f mov r7, r1 + 2d4c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 2d50: 4606 mov r6, r0 + 2d52: 460f mov r7, r1 int rc; BOOT_LOG_DBG("erasing trailer; fa_id=%d", fap->fa_id); image_index = BOOT_CURR_IMG(state); fa_id_primary = flash_area_id_from_multi_image_slot(image_index, - 2cf4: 2100 movs r1, #0 - 2cf6: 4608 mov r0, r1 - 2cf8: f000 ffdf bl 3cba - 2cfc: 4604 mov r4, r0 + 2d54: 2100 movs r1, #0 + 2d56: 4608 mov r0, r1 + 2d58: f000 ffdf bl 3d1a + 2d5c: 4604 mov r4, r0 BOOT_PRIMARY_SLOT); fa_id_secondary = flash_area_id_from_multi_image_slot(image_index, - 2cfe: 2101 movs r1, #1 - 2d00: 2000 movs r0, #0 - 2d02: f000 ffda bl 3cba + 2d5e: 2101 movs r1, #1 + 2d60: 2000 movs r0, #0 + 2d62: f000 ffda bl 3d1a BOOT_SECONDARY_SLOT); if (fap->fa_id == fa_id_primary) { - 2d06: 783b ldrb r3, [r7, #0] - 2d08: 42a3 cmp r3, r4 - 2d0a: d029 beq.n 2d60 + 2d66: 783b ldrb r3, [r7, #0] + 2d68: 42a3 cmp r3, r4 + 2d6a: d029 beq.n 2dc0 slot = BOOT_PRIMARY_SLOT; } else if (fap->fa_id == fa_id_secondary) { - 2d0c: 4283 cmp r3, r0 - 2d0e: d001 beq.n 2d14 + 2d6c: 4283 cmp r3, r0 + 2d6e: d001 beq.n 2d74 slot = BOOT_SECONDARY_SLOT; } else { return BOOT_EFLASH; - 2d10: 2301 movs r3, #1 - 2d12: e022 b.n 2d5a + 2d70: 2301 movs r3, #1 + 2d72: e022 b.n 2dba slot = BOOT_SECONDARY_SLOT; - 2d14: 2301 movs r3, #1 + 2d74: 2301 movs r3, #1 } /* delete starting from last sector and moving to beginning */ sector = boot_img_num_sectors(state, slot) - 1; - 2d16: 4698 mov r8, r3 + 2d76: 4698 mov r8, r3 return BOOT_IMG(state, slot).num_sectors; - 2d18: 222c movs r2, #44 ; 0x2c - 2d1a: fb02 6303 mla r3, r2, r3, r6 - 2d1e: 6a9c ldr r4, [r3, #40] ; 0x28 - 2d20: 3c01 subs r4, #1 + 2d78: 222c movs r2, #44 ; 0x2c + 2d7a: fb02 6303 mla r3, r2, r3, r6 + 2d7e: 6a9c ldr r4, [r3, #40] ; 0x28 + 2d80: 3c01 subs r4, #1 trailer_sz = boot_trailer_sz(BOOT_WRITE_SZ(state)); - 2d22: 6eb0 ldr r0, [r6, #104] ; 0x68 - 2d24: f000 fcfe bl 3724 - 2d28: 4681 mov r9, r0 + 2d82: 6eb0 ldr r0, [r6, #104] ; 0x68 + 2d84: f000 fcfe bl 3784 + 2d88: 4681 mov r9, r0 total_sz = 0; - 2d2a: 2500 movs r5, #0 + 2d8a: 2500 movs r5, #0 static inline size_t boot_img_sector_size(const struct boot_loader_state *state, size_t slot, size_t sector) { return BOOT_IMG(state, slot).sectors[sector].fa_size; - 2d2c: 232c movs r3, #44 ; 0x2c - 2d2e: fb03 6308 mla r3, r3, r8, r6 - 2d32: 6a5a ldr r2, [r3, #36] ; 0x24 - 2d34: eb04 0144 add.w r1, r4, r4, lsl #1 - 2d38: 008b lsls r3, r1, #2 - 2d3a: 4413 add r3, r2 - 2d3c: f8d3 a008 ldr.w sl, [r3, #8] + 2d8c: 232c movs r3, #44 ; 0x2c + 2d8e: fb03 6308 mla r3, r3, r8, r6 + 2d92: 6a5a ldr r2, [r3, #36] ; 0x24 + 2d94: eb04 0144 add.w r1, r4, r4, lsl #1 + 2d98: 008b lsls r3, r1, #2 + 2d9a: 4413 add r3, r2 + 2d9c: f8d3 a008 ldr.w sl, [r3, #8] */ static inline uint32_t boot_img_sector_off(const struct boot_loader_state *state, size_t slot, size_t sector) { return BOOT_IMG(state, slot).sectors[sector].fa_off - - 2d40: 6859 ldr r1, [r3, #4] + 2da0: 6859 ldr r1, [r3, #4] BOOT_IMG(state, slot).sectors[0].fa_off; - 2d42: 6853 ldr r3, [r2, #4] + 2da2: 6853 ldr r3, [r2, #4] do { sz = boot_img_sector_size(state, slot, sector); off = boot_img_sector_off(state, slot, sector); rc = boot_erase_region(fap, off, sz); - 2d44: 4652 mov r2, sl - 2d46: 1ac9 subs r1, r1, r3 - 2d48: 4638 mov r0, r7 - 2d4a: f7ff fef7 bl 2b3c + 2da4: 4652 mov r2, sl + 2da6: 1ac9 subs r1, r1, r3 + 2da8: 4638 mov r0, r7 + 2daa: f7ff fef7 bl 2b9c assert(rc == 0); - 2d4e: 4603 mov r3, r0 - 2d50: b940 cbnz r0, 2d64 + 2dae: 4603 mov r3, r0 + 2db0: b940 cbnz r0, 2dc4 sector--; - 2d52: 3c01 subs r4, #1 + 2db2: 3c01 subs r4, #1 total_sz += sz; - 2d54: 4455 add r5, sl + 2db4: 4455 add r5, sl } while (total_sz < trailer_sz); - 2d56: 45a9 cmp r9, r5 - 2d58: d8e8 bhi.n 2d2c + 2db6: 45a9 cmp r9, r5 + 2db8: d8e8 bhi.n 2d8c return rc; } - 2d5a: 4618 mov r0, r3 - 2d5c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 2dba: 4618 mov r0, r3 + 2dbc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} slot = BOOT_PRIMARY_SLOT; - 2d60: 2300 movs r3, #0 - 2d62: e7d8 b.n 2d16 + 2dc0: 2300 movs r3, #0 + 2dc2: e7d8 b.n 2d76 assert(rc == 0); - 2d64: 2300 movs r3, #0 - 2d66: 461a mov r2, r3 - 2d68: 4619 mov r1, r3 - 2d6a: 4618 mov r0, r3 - 2d6c: f7fe fcce bl 170c <__assert_func> + 2dc4: 2300 movs r3, #0 + 2dc6: 461a mov r2, r3 + 2dc8: 4619 mov r1, r3 + 2dca: 4618 mov r0, r3 + 2dcc: f7fe fc9e bl 170c <__assert_func> -00002d70 : +00002dd0 : int swap_status_init(const struct boot_loader_state *state, const struct flash_area *fap, const struct boot_status *bs) { - 2d70: b530 push {r4, r5, lr} - 2d72: b083 sub sp, #12 - 2d74: 460c mov r4, r1 - 2d76: 4615 mov r5, r2 + 2dd0: b530 push {r4, r5, lr} + 2dd2: b083 sub sp, #12 + 2dd4: 460c mov r4, r1 + 2dd6: 4615 mov r5, r2 image_index = BOOT_CURR_IMG(state); BOOT_LOG_DBG("initializing status; fa_id=%d", fap->fa_id); rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SECONDARY(image_index), - 2d78: 4669 mov r1, sp - 2d7a: 2002 movs r0, #2 - 2d7c: f000 fd5a bl 3834 + 2dd8: 4669 mov r1, sp + 2dda: 2002 movs r0, #2 + 2ddc: f000 fd5a bl 3894 &swap_state); assert(rc == 0); - 2d80: b990 cbnz r0, 2da8 + 2de0: b990 cbnz r0, 2e08 if (bs->swap_type != BOOT_SWAP_TYPE_NONE) { - 2d82: 79e9 ldrb r1, [r5, #7] - 2d84: 2901 cmp r1, #1 - 2d86: d115 bne.n 2db4 + 2de2: 79e9 ldrb r1, [r5, #7] + 2de4: 2901 cmp r1, #1 + 2de6: d115 bne.n 2e14 rc = boot_write_swap_info(fap, bs->swap_type, image_index); assert(rc == 0); } if (swap_state.image_ok == BOOT_FLAG_SET) { - 2d88: f89d 3003 ldrb.w r3, [sp, #3] - 2d8c: 2b01 cmp r3, #1 - 2d8e: d01d beq.n 2dcc + 2de8: f89d 3003 ldrb.w r3, [sp, #3] + 2dec: 2b01 cmp r3, #1 + 2dee: d01d beq.n 2e2c rc = boot_write_image_ok(fap); assert(rc == 0); } rc = boot_write_swap_size(fap, bs->swap_size); - 2d90: 68a9 ldr r1, [r5, #8] - 2d92: 4620 mov r0, r4 - 2d94: f000 fdb6 bl 3904 + 2df0: 68a9 ldr r1, [r5, #8] + 2df2: 4620 mov r0, r4 + 2df4: f000 fdb6 bl 3964 assert(rc == 0); - 2d98: bb18 cbnz r0, 2de2 + 2df8: bb18 cbnz r0, 2e42 rc = boot_write_enc_key(fap, 1, bs); assert(rc == 0); #endif rc = boot_write_magic(fap); - 2d9a: 4620 mov r0, r4 - 2d9c: f000 fd72 bl 3884 + 2dfa: 4620 mov r0, r4 + 2dfc: f000 fd72 bl 38e4 assert(rc == 0); - 2da0: bb28 cbnz r0, 2dee + 2e00: bb28 cbnz r0, 2e4e return 0; } - 2da2: 2000 movs r0, #0 - 2da4: b003 add sp, #12 - 2da6: bd30 pop {r4, r5, pc} + 2e02: 2000 movs r0, #0 + 2e04: b003 add sp, #12 + 2e06: bd30 pop {r4, r5, pc} assert(rc == 0); - 2da8: 2300 movs r3, #0 - 2daa: 461a mov r2, r3 - 2dac: 4619 mov r1, r3 - 2dae: 4618 mov r0, r3 - 2db0: f7fe fcac bl 170c <__assert_func> + 2e08: 2300 movs r3, #0 + 2e0a: 461a mov r2, r3 + 2e0c: 4619 mov r1, r3 + 2e0e: 4618 mov r0, r3 + 2e10: f7fe fc7c bl 170c <__assert_func> rc = boot_write_swap_info(fap, bs->swap_type, image_index); - 2db4: 2200 movs r2, #0 - 2db6: 4620 mov r0, r4 - 2db8: f000 fd82 bl 38c0 + 2e14: 2200 movs r2, #0 + 2e16: 4620 mov r0, r4 + 2e18: f000 fd82 bl 3920 assert(rc == 0); - 2dbc: 2800 cmp r0, #0 - 2dbe: d0e3 beq.n 2d88 - 2dc0: 2300 movs r3, #0 - 2dc2: 461a mov r2, r3 - 2dc4: 4619 mov r1, r3 - 2dc6: 4618 mov r0, r3 - 2dc8: f7fe fca0 bl 170c <__assert_func> + 2e1c: 2800 cmp r0, #0 + 2e1e: d0e3 beq.n 2de8 + 2e20: 2300 movs r3, #0 + 2e22: 461a mov r2, r3 + 2e24: 4619 mov r1, r3 + 2e26: 4618 mov r0, r3 + 2e28: f7fe fc70 bl 170c <__assert_func> rc = boot_write_image_ok(fap); - 2dcc: 4620 mov r0, r4 - 2dce: f000 fd70 bl 38b2 + 2e2c: 4620 mov r0, r4 + 2e2e: f000 fd70 bl 3912 assert(rc == 0); - 2dd2: 2800 cmp r0, #0 - 2dd4: d0dc beq.n 2d90 - 2dd6: 2300 movs r3, #0 - 2dd8: 461a mov r2, r3 - 2dda: 4619 mov r1, r3 - 2ddc: 4618 mov r0, r3 - 2dde: f7fe fc95 bl 170c <__assert_func> + 2e32: 2800 cmp r0, #0 + 2e34: d0dc beq.n 2df0 + 2e36: 2300 movs r3, #0 + 2e38: 461a mov r2, r3 + 2e3a: 4619 mov r1, r3 + 2e3c: 4618 mov r0, r3 + 2e3e: f7fe fc65 bl 170c <__assert_func> assert(rc == 0); - 2de2: 2300 movs r3, #0 - 2de4: 461a mov r2, r3 - 2de6: 4619 mov r1, r3 - 2de8: 4618 mov r0, r3 - 2dea: f7fe fc8f bl 170c <__assert_func> + 2e42: 2300 movs r3, #0 + 2e44: 461a mov r2, r3 + 2e46: 4619 mov r1, r3 + 2e48: 4618 mov r0, r3 + 2e4a: f7fe fc5f bl 170c <__assert_func> assert(rc == 0); - 2dee: 2300 movs r3, #0 - 2df0: 461a mov r2, r3 - 2df2: 4619 mov r1, r3 - 2df4: 4618 mov r0, r3 - 2df6: f7fe fc89 bl 170c <__assert_func> + 2e4e: 2300 movs r3, #0 + 2e50: 461a mov r2, r3 + 2e52: 4619 mov r1, r3 + 2e54: 4618 mov r0, r3 + 2e56: f7fe fc59 bl 170c <__assert_func> -00002dfa : +00002e5a : int swap_read_status(struct boot_loader_state *state, struct boot_status *bs) { - 2dfa: b570 push {r4, r5, r6, lr} - 2dfc: b082 sub sp, #8 - 2dfe: 4606 mov r6, r0 - 2e00: 460d mov r5, r1 + 2e5a: b570 push {r4, r5, r6, lr} + 2e5c: b082 sub sp, #8 + 2e5e: 4606 mov r6, r0 + 2e60: 460d mov r5, r1 uint32_t off; uint8_t swap_info; int area_id; int rc; bs->source = swap_status_source(state); - 2e02: f000 fb1b bl 343c - 2e06: 60e8 str r0, [r5, #12] + 2e62: f000 fb1b bl 349c + 2e66: 60e8 str r0, [r5, #12] switch (bs->source) { - 2e08: 2801 cmp r0, #1 - 2e0a: d009 beq.n 2e20 - 2e0c: 4604 mov r4, r0 - 2e0e: 2802 cmp r0, #2 - 2e10: d00f beq.n 2e32 - 2e12: b158 cbz r0, 2e2c + 2e68: 2801 cmp r0, #1 + 2e6a: d009 beq.n 2e80 + 2e6c: 4604 mov r4, r0 + 2e6e: 2802 cmp r0, #2 + 2e70: d00f beq.n 2e92 + 2e72: b158 cbz r0, 2e8c case BOOT_STATUS_SOURCE_PRIMARY_SLOT: area_id = FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state)); break; default: assert(0); - 2e14: 2300 movs r3, #0 - 2e16: 461a mov r2, r3 - 2e18: 4619 mov r1, r3 - 2e1a: 4618 mov r0, r3 - 2e1c: f7fe fc76 bl 170c <__assert_func> + 2e74: 2300 movs r3, #0 + 2e76: 461a mov r2, r3 + 2e78: 4619 mov r1, r3 + 2e7a: 4618 mov r0, r3 + 2e7c: f7fe fc46 bl 170c <__assert_func> area_id = FLASH_AREA_IMAGE_SCRATCH; - 2e20: 2003 movs r0, #3 + 2e80: 2003 movs r0, #3 return BOOT_EBADARGS; } rc = flash_area_open(area_id, &fap); - 2e22: a901 add r1, sp, #4 - 2e24: f001 fdac bl 4980 + 2e82: a901 add r1, sp, #4 + 2e84: f001 fdac bl 49e0 if (rc != 0) { - 2e28: b128 cbz r0, 2e36 + 2e88: b128 cbz r0, 2e96 return BOOT_EFLASH; - 2e2a: 2401 movs r4, #1 + 2e8a: 2401 movs r4, #1 } flash_area_close(fap); return rc; } - 2e2c: 4620 mov r0, r4 - 2e2e: b002 add sp, #8 - 2e30: bd70 pop {r4, r5, r6, pc} + 2e8c: 4620 mov r0, r4 + 2e8e: b002 add sp, #8 + 2e90: bd70 pop {r4, r5, r6, pc} area_id = FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state)); - 2e32: 2001 movs r0, #1 - 2e34: e7f5 b.n 2e22 + 2e92: 2001 movs r0, #1 + 2e94: e7f5 b.n 2e82 rc = swap_read_status_bytes(fap, state, bs); - 2e36: 462a mov r2, r5 - 2e38: 4631 mov r1, r6 - 2e3a: 9801 ldr r0, [sp, #4] - 2e3c: f000 fa12 bl 3264 + 2e96: 462a mov r2, r5 + 2e98: 4631 mov r1, r6 + 2e9a: 9801 ldr r0, [sp, #4] + 2e9c: f000 fa12 bl 32c4 if (rc == 0) { - 2e40: 4604 mov r4, r0 - 2e42: 2800 cmp r0, #0 - 2e44: d1f2 bne.n 2e2c + 2ea0: 4604 mov r4, r0 + 2ea2: 2800 cmp r0, #0 + 2ea4: d1f2 bne.n 2e8c off = boot_swap_info_off(fap); - 2e46: 9801 ldr r0, [sp, #4] - 2e48: f000 fc91 bl 376e + 2ea6: 9801 ldr r0, [sp, #4] + 2ea8: f000 fc91 bl 37ce rc = flash_area_read_is_empty(fap, off, &swap_info, sizeof swap_info); - 2e4c: 2301 movs r3, #1 - 2e4e: f10d 0203 add.w r2, sp, #3 - 2e52: 4601 mov r1, r0 - 2e54: 9801 ldr r0, [sp, #4] - 2e56: f001 fe34 bl 4ac2 + 2eac: 2301 movs r3, #1 + 2eae: f10d 0203 add.w r2, sp, #3 + 2eb2: 4601 mov r1, r0 + 2eb4: 9801 ldr r0, [sp, #4] + 2eb6: f001 fe34 bl 4b22 if (rc == 1) { - 2e5a: 2801 cmp r0, #1 - 2e5c: d006 beq.n 2e6c + 2eba: 2801 cmp r0, #1 + 2ebc: d006 beq.n 2ecc bs->swap_type = BOOT_GET_SWAP_TYPE(swap_info); - 2e5e: f89d 3003 ldrb.w r3, [sp, #3] - 2e62: f003 030f and.w r3, r3, #15 - 2e66: 71eb strb r3, [r5, #7] - 2e68: 4604 mov r4, r0 - 2e6a: e7df b.n 2e2c + 2ebe: f89d 3003 ldrb.w r3, [sp, #3] + 2ec2: f003 030f and.w r3, r3, #15 + 2ec6: 71eb strb r3, [r5, #7] + 2ec8: 4604 mov r4, r0 + 2eca: e7df b.n 2e8c BOOT_SET_SWAP_INFO(swap_info, 0, BOOT_SWAP_TYPE_NONE); - 2e6c: 2301 movs r3, #1 - 2e6e: f88d 3003 strb.w r3, [sp, #3] + 2ecc: 2301 movs r3, #1 + 2ece: f88d 3003 strb.w r3, [sp, #3] rc = 0; - 2e72: 4620 mov r0, r4 - 2e74: e7f3 b.n 2e5e + 2ed2: 4620 mov r0, r4 + 2ed4: e7f3 b.n 2ebe -00002e76 : +00002ed6 : int swap_set_copy_done(uint8_t image_index) { - 2e76: b500 push {lr} - 2e78: b083 sub sp, #12 + 2ed6: b500 push {lr} + 2ed8: b083 sub sp, #12 const struct flash_area *fap; int rc; rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY(image_index), - 2e7a: a901 add r1, sp, #4 - 2e7c: 2001 movs r0, #1 - 2e7e: f001 fd7f bl 4980 + 2eda: a901 add r1, sp, #4 + 2edc: 2001 movs r0, #1 + 2ede: f001 fd7f bl 49e0 &fap); if (rc != 0) { - 2e82: b118 cbz r0, 2e8c + 2ee2: b118 cbz r0, 2eec return BOOT_EFLASH; - 2e84: 2001 movs r0, #1 + 2ee4: 2001 movs r0, #1 } rc = boot_write_copy_done(fap); flash_area_close(fap); return rc; } - 2e86: b003 add sp, #12 - 2e88: f85d fb04 ldr.w pc, [sp], #4 + 2ee6: b003 add sp, #12 + 2ee8: f85d fb04 ldr.w pc, [sp], #4 rc = boot_write_copy_done(fap); - 2e8c: 9801 ldr r0, [sp, #4] - 2e8e: f000 fd09 bl 38a4 + 2eec: 9801 ldr r0, [sp, #4] + 2eee: f000 fd09 bl 3904 return rc; - 2e92: e7f8 b.n 2e86 + 2ef2: e7f8 b.n 2ee6 -00002e94 : +00002ef4 : int swap_set_image_ok(uint8_t image_index) { - 2e94: b500 push {lr} - 2e96: b085 sub sp, #20 + 2ef4: b500 push {lr} + 2ef6: b085 sub sp, #20 const struct flash_area *fap; struct boot_swap_state state; int rc; rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY(image_index), - 2e98: a903 add r1, sp, #12 - 2e9a: 2001 movs r0, #1 - 2e9c: f001 fd70 bl 4980 + 2ef8: a903 add r1, sp, #12 + 2efa: 2001 movs r0, #1 + 2efc: f001 fd70 bl 49e0 &fap); if (rc != 0) { - 2ea0: b120 cbz r0, 2eac + 2f00: b120 cbz r0, 2f0c return BOOT_EFLASH; - 2ea2: 2301 movs r3, #1 + 2f02: 2301 movs r3, #1 } out: flash_area_close(fap); return rc; } - 2ea4: 4618 mov r0, r3 - 2ea6: b005 add sp, #20 - 2ea8: f85d fb04 ldr.w pc, [sp], #4 + 2f04: 4618 mov r0, r3 + 2f06: b005 add sp, #20 + 2f08: f85d fb04 ldr.w pc, [sp], #4 rc = boot_read_swap_state(fap, &state); - 2eac: a901 add r1, sp, #4 - 2eae: 9803 ldr r0, [sp, #12] - 2eb0: f000 fc60 bl 3774 + 2f0c: a901 add r1, sp, #4 + 2f0e: 9803 ldr r0, [sp, #12] + 2f10: f000 fc60 bl 37d4 if (rc != 0) { - 2eb4: 4603 mov r3, r0 - 2eb6: b940 cbnz r0, 2eca + 2f14: 4603 mov r3, r0 + 2f16: b940 cbnz r0, 2f2a if (state.image_ok == BOOT_FLAG_UNSET) { - 2eb8: f89d 2007 ldrb.w r2, [sp, #7] - 2ebc: 2a03 cmp r2, #3 - 2ebe: d1f1 bne.n 2ea4 + 2f18: f89d 2007 ldrb.w r2, [sp, #7] + 2f1c: 2a03 cmp r2, #3 + 2f1e: d1f1 bne.n 2f04 rc = boot_write_image_ok(fap); - 2ec0: 9803 ldr r0, [sp, #12] - 2ec2: f000 fcf6 bl 38b2 - 2ec6: 4603 mov r3, r0 - 2ec8: e7ec b.n 2ea4 + 2f20: 9803 ldr r0, [sp, #12] + 2f22: f000 fcf6 bl 3912 + 2f26: 4603 mov r3, r0 + 2f28: e7ec b.n 2f04 rc = BOOT_EFLASH; - 2eca: 2301 movs r3, #1 - 2ecc: e7ea b.n 2ea4 + 2f2a: 2301 movs r3, #1 + 2f2c: e7ea b.n 2f04 -00002ece : +00002f2e : * [first-sector, last-sector] range. */ static uint32_t boot_copy_sz(const struct boot_loader_state *state, int last_sector_idx, int *out_first_sector_idx) { - 2ece: b4f0 push {r4, r5, r6, r7} - 2ed0: 4606 mov r6, r0 + 2f2e: b4f0 push {r4, r5, r6, r7} + 2f30: 4606 mov r6, r0 #if MCUBOOT_SWAP_USING_SCRATCH #define BOOT_SCRATCH_AREA(state) ((state)->scratch.area) static inline size_t boot_scratch_area_size(const struct boot_loader_state *state) { return BOOT_SCRATCH_AREA(state)->fa_size; - 2ed2: 6d83 ldr r3, [r0, #88] ; 0x58 - 2ed4: 689f ldr r7, [r3, #8] + 2f32: 6d83 ldr r3, [r0, #88] ; 0x58 + 2f34: 689f ldr r7, [r3, #8] size_t scratch_sz; uint32_t new_sz; uint32_t sz; int i; sz = 0; - 2ed6: 2000 movs r0, #0 + 2f36: 2000 movs r0, #0 scratch_sz = boot_scratch_area_size(state); for (i = last_sector_idx; i >= 0; i--) { - 2ed8: 2900 cmp r1, #0 - 2eda: db0b blt.n 2ef4 + 2f38: 2900 cmp r1, #0 + 2f3a: db0b blt.n 2f54 return BOOT_IMG(state, slot).sectors[sector].fa_size; - 2edc: 6a73 ldr r3, [r6, #36] ; 0x24 - 2ede: eb01 0541 add.w r5, r1, r1, lsl #1 - 2ee2: 00ac lsls r4, r5, #2 - 2ee4: 4423 add r3, r4 - 2ee6: 689b ldr r3, [r3, #8] + 2f3c: 6a73 ldr r3, [r6, #36] ; 0x24 + 2f3e: eb01 0541 add.w r5, r1, r1, lsl #1 + 2f42: 00ac lsls r4, r5, #2 + 2f44: 4423 add r3, r4 + 2f46: 689b ldr r3, [r3, #8] new_sz = sz + boot_img_sector_size(state, BOOT_PRIMARY_SLOT, i); - 2ee8: 4403 add r3, r0 + 2f48: 4403 add r3, r0 /* * The secondary slot is not being checked here, because * `boot_slots_compatible` already provides assurance that the copy size * will be compatible with the primary slot and scratch. */ if (new_sz > scratch_sz) { - 2eea: 429f cmp r7, r3 - 2eec: d302 bcc.n 2ef4 + 2f4a: 429f cmp r7, r3 + 2f4c: d302 bcc.n 2f54 for (i = last_sector_idx; i >= 0; i--) { - 2eee: 3901 subs r1, #1 + 2f4e: 3901 subs r1, #1 break; } sz = new_sz; - 2ef0: 4618 mov r0, r3 - 2ef2: e7f1 b.n 2ed8 + 2f50: 4618 mov r0, r3 + 2f52: e7f1 b.n 2f38 } /* i currently refers to a sector that doesn't fit or it is -1 because all * sectors have been processed. In both cases, exclude sector i. */ *out_first_sector_idx = i + 1; - 2ef4: 3101 adds r1, #1 - 2ef6: 6011 str r1, [r2, #0] + 2f54: 3101 adds r1, #1 + 2f56: 6011 str r1, [r2, #0] return sz; } - 2ef8: bcf0 pop {r4, r5, r6, r7} - 2efa: 4770 bx lr + 2f58: bcf0 pop {r4, r5, r6, r7} + 2f5a: 4770 bx lr -00002efc : +00002f5c : * @return 0 on success; nonzero on failure. */ static void boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, struct boot_status *bs) { - 2efc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 2f00: b088 sub sp, #32 - 2f02: 460f mov r7, r1 - 2f04: 4615 mov r5, r2 - 2f06: 461c mov r4, r3 + 2f5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 2f60: b088 sub sp, #32 + 2f62: 460f mov r7, r1 + 2f64: 4615 mov r5, r2 + 2f66: 461c mov r4, r3 return BOOT_IMG(state, slot).sectors[sector].fa_off - - 2f08: 6a52 ldr r2, [r2, #36] ; 0x24 - 2f0a: eb00 0040 add.w r0, r0, r0, lsl #1 - 2f0e: 0083 lsls r3, r0, #2 - 2f10: 4413 add r3, r2 - 2f12: 685e ldr r6, [r3, #4] + 2f68: 6a52 ldr r2, [r2, #36] ; 0x24 + 2f6a: eb00 0040 add.w r0, r0, r0, lsl #1 + 2f6e: 0083 lsls r3, r0, #2 + 2f70: 4413 add r3, r2 + 2f72: 685e ldr r6, [r3, #4] BOOT_IMG(state, slot).sectors[0].fa_off; - 2f14: 6853 ldr r3, [r2, #4] + 2f74: 6853 ldr r3, [r2, #4] return BOOT_IMG(state, slot).sectors[sector].fa_off - - 2f16: 1af6 subs r6, r6, r3 + 2f76: 1af6 subs r6, r6, r3 /* Calculate offset from start of image area. */ img_off = boot_img_sector_off(state, BOOT_PRIMARY_SLOT, idx); copy_sz = sz; trailer_sz = boot_trailer_sz(BOOT_WRITE_SZ(state)); - 2f18: 6ea8 ldr r0, [r5, #104] ; 0x68 - 2f1a: f000 fc03 bl 3724 + 2f78: 6ea8 ldr r0, [r5, #104] ; 0x68 + 2f7a: f000 fc03 bl 3784 return BOOT_IMG(state, slot).num_sectors; - 2f1e: 6aab ldr r3, [r5, #40] ; 0x28 + 2f7e: 6aab ldr r3, [r5, #40] ; 0x28 * copying it, we need to use scratch to write the trailer temporarily. * * NOTE: `use_scratch` is a temporary flag (never written to flash) which * controls if special handling is needed (swapping last sector). */ last_sector = boot_img_num_sectors(state, BOOT_PRIMARY_SLOT) - 1; - 2f20: 3b01 subs r3, #1 + 2f80: 3b01 subs r3, #1 if ((img_off + sz) > - 2f22: eb07 0c06 add.w ip, r7, r6 + 2f82: eb07 0c06 add.w ip, r7, r6 return BOOT_IMG(state, slot).sectors[sector].fa_off - - 2f26: 6a69 ldr r1, [r5, #36] ; 0x24 - 2f28: eb03 0343 add.w r3, r3, r3, lsl #1 - 2f2c: 009a lsls r2, r3, #2 - 2f2e: 440a add r2, r1 - 2f30: 6853 ldr r3, [r2, #4] + 2f86: 6a69 ldr r1, [r5, #36] ; 0x24 + 2f88: eb03 0343 add.w r3, r3, r3, lsl #1 + 2f8c: 009a lsls r2, r3, #2 + 2f8e: 440a add r2, r1 + 2f90: 6853 ldr r3, [r2, #4] BOOT_IMG(state, slot).sectors[0].fa_off; - 2f32: 684a ldr r2, [r1, #4] + 2f92: 684a ldr r2, [r1, #4] return BOOT_IMG(state, slot).sectors[sector].fa_off - - 2f34: 1a9b subs r3, r3, r2 - 2f36: 459c cmp ip, r3 - 2f38: d923 bls.n 2f82 + 2f94: 1a9b subs r3, r3, r2 + 2f96: 459c cmp ip, r3 + 2f98: d923 bls.n 2fe2 boot_img_sector_off(state, BOOT_PRIMARY_SLOT, last_sector)) { copy_sz -= trailer_sz; - 2f3a: eba7 0800 sub.w r8, r7, r0 + 2f9a: eba7 0800 sub.w r8, r7, r0 } bs->use_scratch = (bs->idx == BOOT_STATUS_IDX_0 && copy_sz != sz); - 2f3e: 6823 ldr r3, [r4, #0] - 2f40: 2b01 cmp r3, #1 - 2f42: d020 beq.n 2f86 - 2f44: 2300 movs r3, #0 - 2f46: 71a3 strb r3, [r4, #6] + 2f9e: 6823 ldr r3, [r4, #0] + 2fa0: 2b01 cmp r3, #1 + 2fa2: d020 beq.n 2fe6 + 2fa4: 2300 movs r3, #0 + 2fa6: 71a3 strb r3, [r4, #6] image_index = BOOT_CURR_IMG(state); rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY(image_index), - 2f48: a907 add r1, sp, #28 - 2f4a: 2001 movs r0, #1 - 2f4c: f001 fd18 bl 4980 + 2fa8: a907 add r1, sp, #28 + 2faa: 2001 movs r0, #1 + 2fac: f001 fd18 bl 49e0 &fap_primary_slot); assert (rc == 0); - 2f50: b9f8 cbnz r0, 2f92 + 2fb0: b9f8 cbnz r0, 2ff2 rc = flash_area_open(FLASH_AREA_IMAGE_SECONDARY(image_index), - 2f52: a906 add r1, sp, #24 - 2f54: 2002 movs r0, #2 - 2f56: f001 fd13 bl 4980 + 2fb2: a906 add r1, sp, #24 + 2fb4: 2002 movs r0, #2 + 2fb6: f001 fd13 bl 49e0 &fap_secondary_slot); assert (rc == 0); - 2f5a: bb00 cbnz r0, 2f9e + 2fba: bb00 cbnz r0, 2ffe rc = flash_area_open(FLASH_AREA_IMAGE_SCRATCH, &fap_scratch); - 2f5c: a905 add r1, sp, #20 - 2f5e: 2003 movs r0, #3 - 2f60: f001 fd0e bl 4980 + 2fbc: a905 add r1, sp, #20 + 2fbe: 2003 movs r0, #3 + 2fc0: f001 fd0e bl 49e0 assert (rc == 0); - 2f64: bb08 cbnz r0, 2faa + 2fc4: bb08 cbnz r0, 300a if (bs->state == BOOT_STATUS_STATE_0) { - 2f66: 7923 ldrb r3, [r4, #4] - 2f68: 2b01 cmp r3, #1 - 2f6a: d024 beq.n 2fb6 + 2fc6: 7923 ldrb r3, [r4, #4] + 2fc8: 2b01 cmp r3, #1 + 2fca: d024 beq.n 3016 rc = boot_write_status(state, bs); bs->state = BOOT_STATUS_STATE_1; BOOT_STATUS_ASSERT(rc == 0); } if (bs->state == BOOT_STATUS_STATE_1) { - 2f6c: 7923 ldrb r3, [r4, #4] - 2f6e: 2b02 cmp r3, #2 - 2f70: f000 8083 beq.w 307a + 2fcc: 7923 ldrb r3, [r4, #4] + 2fce: 2b02 cmp r3, #2 + 2fd0: f000 8083 beq.w 30da rc = boot_write_status(state, bs); bs->state = BOOT_STATUS_STATE_2; BOOT_STATUS_ASSERT(rc == 0); } if (bs->state == BOOT_STATUS_STATE_2) { - 2f74: 7923 ldrb r3, [r4, #4] - 2f76: 2b03 cmp r3, #3 - 2f78: f000 80bb beq.w 30f2 + 2fd4: 7923 ldrb r3, [r4, #4] + 2fd6: 2b03 cmp r3, #3 + 2fd8: f000 80bb beq.w 3152 } flash_area_close(fap_primary_slot); flash_area_close(fap_secondary_slot); flash_area_close(fap_scratch); } - 2f7c: b008 add sp, #32 - 2f7e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 2fdc: b008 add sp, #32 + 2fde: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} copy_sz = sz; - 2f82: 46b8 mov r8, r7 - 2f84: e7db b.n 2f3e + 2fe2: 46b8 mov r8, r7 + 2fe4: e7db b.n 2f9e bs->use_scratch = (bs->idx == BOOT_STATUS_IDX_0 && copy_sz != sz); - 2f86: 45b8 cmp r8, r7 - 2f88: d001 beq.n 2f8e - 2f8a: 2301 movs r3, #1 - 2f8c: e7db b.n 2f46 - 2f8e: 2300 movs r3, #0 - 2f90: e7d9 b.n 2f46 + 2fe6: 45b8 cmp r8, r7 + 2fe8: d001 beq.n 2fee + 2fea: 2301 movs r3, #1 + 2fec: e7db b.n 2fa6 + 2fee: 2300 movs r3, #0 + 2ff0: e7d9 b.n 2fa6 assert (rc == 0); - 2f92: 2300 movs r3, #0 - 2f94: 461a mov r2, r3 - 2f96: 4619 mov r1, r3 - 2f98: 4618 mov r0, r3 - 2f9a: f7fe fbb7 bl 170c <__assert_func> + 2ff2: 2300 movs r3, #0 + 2ff4: 461a mov r2, r3 + 2ff6: 4619 mov r1, r3 + 2ff8: 4618 mov r0, r3 + 2ffa: f7fe fb87 bl 170c <__assert_func> assert (rc == 0); - 2f9e: 2300 movs r3, #0 - 2fa0: 461a mov r2, r3 - 2fa2: 4619 mov r1, r3 - 2fa4: 4618 mov r0, r3 - 2fa6: f7fe fbb1 bl 170c <__assert_func> + 2ffe: 2300 movs r3, #0 + 3000: 461a mov r2, r3 + 3002: 4619 mov r1, r3 + 3004: 4618 mov r0, r3 + 3006: f7fe fb81 bl 170c <__assert_func> assert (rc == 0); - 2faa: 2300 movs r3, #0 - 2fac: 461a mov r2, r3 - 2fae: 4619 mov r1, r3 - 2fb0: 4618 mov r0, r3 - 2fb2: f7fe fbab bl 170c <__assert_func> + 300a: 2300 movs r3, #0 + 300c: 461a mov r2, r3 + 300e: 4619 mov r1, r3 + 3010: 4618 mov r0, r3 + 3012: f7fe fb7b bl 170c <__assert_func> rc = boot_erase_region(fap_scratch, 0, fap_scratch->fa_size); - 2fb6: 9805 ldr r0, [sp, #20] - 2fb8: 6882 ldr r2, [r0, #8] - 2fba: 2100 movs r1, #0 - 2fbc: f7ff fdbe bl 2b3c + 3016: 9805 ldr r0, [sp, #20] + 3018: 6882 ldr r2, [r0, #8] + 301a: 2100 movs r1, #0 + 301c: f7ff fdbe bl 2b9c assert(rc == 0); - 2fc0: b9e0 cbnz r0, 2ffc + 3020: b9e0 cbnz r0, 305c if (bs->idx == BOOT_STATUS_IDX_0) { - 2fc2: 6823 ldr r3, [r4, #0] - 2fc4: 2b01 cmp r3, #1 - 2fc6: d01f beq.n 3008 + 3022: 6823 ldr r3, [r4, #0] + 3024: 2b01 cmp r3, #1 + 3026: d01f beq.n 3068 rc = boot_copy_region(state, fap_secondary_slot, fap_scratch, - 2fc8: f8cd 8004 str.w r8, [sp, #4] - 2fcc: 2300 movs r3, #0 - 2fce: 9300 str r3, [sp, #0] - 2fd0: 4633 mov r3, r6 - 2fd2: 9a05 ldr r2, [sp, #20] - 2fd4: 9906 ldr r1, [sp, #24] - 2fd6: 4628 mov r0, r5 - 2fd8: f7ff fdb4 bl 2b44 + 3028: f8cd 8004 str.w r8, [sp, #4] + 302c: 2300 movs r3, #0 + 302e: 9300 str r3, [sp, #0] + 3030: 4633 mov r3, r6 + 3032: 9a05 ldr r2, [sp, #20] + 3034: 9906 ldr r1, [sp, #24] + 3036: 4628 mov r0, r5 + 3038: f7ff fdb4 bl 2ba4 assert(rc == 0); - 2fdc: 2800 cmp r0, #0 - 2fde: d146 bne.n 306e + 303c: 2800 cmp r0, #0 + 303e: d146 bne.n 30ce rc = boot_write_status(state, bs); - 2fe0: 4621 mov r1, r4 - 2fe2: 4628 mov r0, r5 - 2fe4: f7ff fd76 bl 2ad4 + 3040: 4621 mov r1, r4 + 3042: 4628 mov r0, r5 + 3044: f7ff fd76 bl 2b34 bs->state = BOOT_STATUS_STATE_1; - 2fe8: 2302 movs r3, #2 - 2fea: 7123 strb r3, [r4, #4] + 3048: 2302 movs r3, #2 + 304a: 7123 strb r3, [r4, #4] BOOT_STATUS_ASSERT(rc == 0); - 2fec: 2800 cmp r0, #0 - 2fee: d0bd beq.n 2f6c - 2ff0: 2300 movs r3, #0 - 2ff2: 461a mov r2, r3 - 2ff4: 4619 mov r1, r3 - 2ff6: 4618 mov r0, r3 - 2ff8: f7fe fb88 bl 170c <__assert_func> + 304c: 2800 cmp r0, #0 + 304e: d0bd beq.n 2fcc + 3050: 2300 movs r3, #0 + 3052: 461a mov r2, r3 + 3054: 4619 mov r1, r3 + 3056: 4618 mov r0, r3 + 3058: f7fe fb58 bl 170c <__assert_func> assert(rc == 0); - 2ffc: 2300 movs r3, #0 - 2ffe: 461a mov r2, r3 - 3000: 4619 mov r1, r3 - 3002: 4618 mov r0, r3 - 3004: f7fe fb82 bl 170c <__assert_func> + 305c: 2300 movs r3, #0 + 305e: 461a mov r2, r3 + 3060: 4619 mov r1, r3 + 3062: 4618 mov r0, r3 + 3064: f7fe fb52 bl 170c <__assert_func> rc = swap_status_init(state, fap_scratch, bs); - 3008: 4622 mov r2, r4 - 300a: 9905 ldr r1, [sp, #20] - 300c: 4628 mov r0, r5 - 300e: f7ff feaf bl 2d70 + 3068: 4622 mov r2, r4 + 306a: 9905 ldr r1, [sp, #20] + 306c: 4628 mov r0, r5 + 306e: f7ff feaf bl 2dd0 assert(rc == 0); - 3012: b9d0 cbnz r0, 304a + 3072: b9d0 cbnz r0, 30aa if (!bs->use_scratch) { - 3014: 79a3 ldrb r3, [r4, #6] - 3016: 2b00 cmp r3, #0 - 3018: d1d6 bne.n 2fc8 + 3074: 79a3 ldrb r3, [r4, #6] + 3076: 2b00 cmp r3, #0 + 3078: d1d6 bne.n 3028 rc = swap_erase_trailer_sectors(state, fap_primary_slot); - 301a: 9907 ldr r1, [sp, #28] - 301c: 4628 mov r0, r5 - 301e: f7ff fe65 bl 2cec + 307a: 9907 ldr r1, [sp, #28] + 307c: 4628 mov r0, r5 + 307e: f7ff fe65 bl 2d4c assert(rc == 0); - 3022: b9c0 cbnz r0, 3056 + 3082: b9c0 cbnz r0, 30b6 rc = swap_status_init(state, fap_primary_slot, bs); - 3024: 4622 mov r2, r4 - 3026: 9907 ldr r1, [sp, #28] - 3028: 4628 mov r0, r5 - 302a: f7ff fea1 bl 2d70 + 3084: 4622 mov r2, r4 + 3086: 9907 ldr r1, [sp, #28] + 3088: 4628 mov r0, r5 + 308a: f7ff fea1 bl 2dd0 assert(rc == 0); - 302e: b9c0 cbnz r0, 3062 + 308e: b9c0 cbnz r0, 30c2 rc = boot_erase_region(fap_scratch, 0, fap_scratch->fa_size); - 3030: 9805 ldr r0, [sp, #20] - 3032: 6882 ldr r2, [r0, #8] - 3034: 2100 movs r1, #0 - 3036: f7ff fd81 bl 2b3c + 3090: 9805 ldr r0, [sp, #20] + 3092: 6882 ldr r2, [r0, #8] + 3094: 2100 movs r1, #0 + 3096: f7ff fd81 bl 2b9c assert(rc == 0); - 303a: 2800 cmp r0, #0 - 303c: d0c4 beq.n 2fc8 - 303e: 2300 movs r3, #0 - 3040: 461a mov r2, r3 - 3042: 4619 mov r1, r3 - 3044: 4618 mov r0, r3 - 3046: f7fe fb61 bl 170c <__assert_func> + 309a: 2800 cmp r0, #0 + 309c: d0c4 beq.n 3028 + 309e: 2300 movs r3, #0 + 30a0: 461a mov r2, r3 + 30a2: 4619 mov r1, r3 + 30a4: 4618 mov r0, r3 + 30a6: f7fe fb31 bl 170c <__assert_func> assert(rc == 0); - 304a: 2300 movs r3, #0 - 304c: 461a mov r2, r3 - 304e: 4619 mov r1, r3 - 3050: 4618 mov r0, r3 - 3052: f7fe fb5b bl 170c <__assert_func> + 30aa: 2300 movs r3, #0 + 30ac: 461a mov r2, r3 + 30ae: 4619 mov r1, r3 + 30b0: 4618 mov r0, r3 + 30b2: f7fe fb2b bl 170c <__assert_func> assert(rc == 0); - 3056: 2300 movs r3, #0 - 3058: 461a mov r2, r3 - 305a: 4619 mov r1, r3 - 305c: 4618 mov r0, r3 - 305e: f7fe fb55 bl 170c <__assert_func> - assert(rc == 0); - 3062: 2300 movs r3, #0 - 3064: 461a mov r2, r3 - 3066: 4619 mov r1, r3 - 3068: 4618 mov r0, r3 - 306a: f7fe fb4f bl 170c <__assert_func> - assert(rc == 0); - 306e: 2300 movs r3, #0 - 3070: 461a mov r2, r3 - 3072: 4619 mov r1, r3 - 3074: 4618 mov r0, r3 - 3076: f7fe fb49 bl 170c <__assert_func> - rc = boot_erase_region(fap_secondary_slot, img_off, sz); - 307a: 463a mov r2, r7 - 307c: 4631 mov r1, r6 - 307e: 9806 ldr r0, [sp, #24] - 3080: f7ff fd5c bl 2b3c - assert(rc == 0); - 3084: b9e8 cbnz r0, 30c2 - rc = boot_copy_region(state, fap_primary_slot, fap_secondary_slot, - 3086: f8cd 8004 str.w r8, [sp, #4] - 308a: 9600 str r6, [sp, #0] - 308c: 4633 mov r3, r6 - 308e: 9a06 ldr r2, [sp, #24] - 3090: 9907 ldr r1, [sp, #28] - 3092: 4628 mov r0, r5 - 3094: f7ff fd56 bl 2b44 - assert(rc == 0); - 3098: b9c8 cbnz r0, 30ce - if (bs->idx == BOOT_STATUS_IDX_0 && !bs->use_scratch) { - 309a: 6823 ldr r3, [r4, #0] - 309c: 2b01 cmp r3, #1 - 309e: d101 bne.n 30a4 - 30a0: 79a3 ldrb r3, [r4, #6] - 30a2: b1d3 cbz r3, 30da - rc = boot_write_status(state, bs); - 30a4: 4621 mov r1, r4 - 30a6: 4628 mov r0, r5 - 30a8: f7ff fd14 bl 2ad4 - bs->state = BOOT_STATUS_STATE_2; - 30ac: 2303 movs r3, #3 - 30ae: 7123 strb r3, [r4, #4] - BOOT_STATUS_ASSERT(rc == 0); - 30b0: 2800 cmp r0, #0 - 30b2: f43f af5f beq.w 2f74 30b6: 2300 movs r3, #0 30b8: 461a mov r2, r3 30ba: 4619 mov r1, r3 30bc: 4618 mov r0, r3 30be: f7fe fb25 bl 170c <__assert_func> - assert(rc == 0); + assert(rc == 0); 30c2: 2300 movs r3, #0 30c4: 461a mov r2, r3 30c6: 4619 mov r1, r3 @@ -10033,5518 +10038,5573 @@ boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, 30d2: 4619 mov r1, r3 30d4: 4618 mov r0, r3 30d6: f7fe fb19 bl 170c <__assert_func> + rc = boot_erase_region(fap_secondary_slot, img_off, sz); + 30da: 463a mov r2, r7 + 30dc: 4631 mov r1, r6 + 30de: 9806 ldr r0, [sp, #24] + 30e0: f7ff fd5c bl 2b9c + assert(rc == 0); + 30e4: b9e8 cbnz r0, 3122 + rc = boot_copy_region(state, fap_primary_slot, fap_secondary_slot, + 30e6: f8cd 8004 str.w r8, [sp, #4] + 30ea: 9600 str r6, [sp, #0] + 30ec: 4633 mov r3, r6 + 30ee: 9a06 ldr r2, [sp, #24] + 30f0: 9907 ldr r1, [sp, #28] + 30f2: 4628 mov r0, r5 + 30f4: f7ff fd56 bl 2ba4 + assert(rc == 0); + 30f8: b9c8 cbnz r0, 312e + if (bs->idx == BOOT_STATUS_IDX_0 && !bs->use_scratch) { + 30fa: 6823 ldr r3, [r4, #0] + 30fc: 2b01 cmp r3, #1 + 30fe: d101 bne.n 3104 + 3100: 79a3 ldrb r3, [r4, #6] + 3102: b1d3 cbz r3, 313a + rc = boot_write_status(state, bs); + 3104: 4621 mov r1, r4 + 3106: 4628 mov r0, r5 + 3108: f7ff fd14 bl 2b34 + bs->state = BOOT_STATUS_STATE_2; + 310c: 2303 movs r3, #3 + 310e: 7123 strb r3, [r4, #4] + BOOT_STATUS_ASSERT(rc == 0); + 3110: 2800 cmp r0, #0 + 3112: f43f af5f beq.w 2fd4 + 3116: 2300 movs r3, #0 + 3118: 461a mov r2, r3 + 311a: 4619 mov r1, r3 + 311c: 4618 mov r0, r3 + 311e: f7fe faf5 bl 170c <__assert_func> + assert(rc == 0); + 3122: 2300 movs r3, #0 + 3124: 461a mov r2, r3 + 3126: 4619 mov r1, r3 + 3128: 4618 mov r0, r3 + 312a: f7fe faef bl 170c <__assert_func> + assert(rc == 0); + 312e: 2300 movs r3, #0 + 3130: 461a mov r2, r3 + 3132: 4619 mov r1, r3 + 3134: 4618 mov r0, r3 + 3136: f7fe fae9 bl 170c <__assert_func> rc = swap_erase_trailer_sectors(state, fap_secondary_slot); - 30da: 9906 ldr r1, [sp, #24] - 30dc: 4628 mov r0, r5 - 30de: f7ff fe05 bl 2cec + 313a: 9906 ldr r1, [sp, #24] + 313c: 4628 mov r0, r5 + 313e: f7ff fe05 bl 2d4c assert(rc == 0); - 30e2: 2800 cmp r0, #0 - 30e4: d0de beq.n 30a4 - 30e6: 2300 movs r3, #0 - 30e8: 461a mov r2, r3 - 30ea: 4619 mov r1, r3 - 30ec: 4618 mov r0, r3 - 30ee: f7fe fb0d bl 170c <__assert_func> + 3142: 2800 cmp r0, #0 + 3144: d0de beq.n 3104 + 3146: 2300 movs r3, #0 + 3148: 461a mov r2, r3 + 314a: 4619 mov r1, r3 + 314c: 4618 mov r0, r3 + 314e: f7fe fadd bl 170c <__assert_func> rc = boot_erase_region(fap_primary_slot, img_off, sz); - 30f2: 463a mov r2, r7 - 30f4: 4631 mov r1, r6 - 30f6: 9807 ldr r0, [sp, #28] - 30f8: f7ff fd20 bl 2b3c + 3152: 463a mov r2, r7 + 3154: 4631 mov r1, r6 + 3156: 9807 ldr r0, [sp, #28] + 3158: f7ff fd20 bl 2b9c assert(rc == 0); - 30fc: 2800 cmp r0, #0 - 30fe: d15b bne.n 31b8 + 315c: 2800 cmp r0, #0 + 315e: d15b bne.n 3218 rc = boot_copy_region(state, fap_scratch, fap_primary_slot, - 3100: f8cd 8004 str.w r8, [sp, #4] - 3104: 9600 str r6, [sp, #0] - 3106: 2300 movs r3, #0 - 3108: 9a07 ldr r2, [sp, #28] - 310a: 9905 ldr r1, [sp, #20] - 310c: 4628 mov r0, r5 - 310e: f7ff fd19 bl 2b44 + 3160: f8cd 8004 str.w r8, [sp, #4] + 3164: 9600 str r6, [sp, #0] + 3166: 2300 movs r3, #0 + 3168: 9a07 ldr r2, [sp, #28] + 316a: 9905 ldr r1, [sp, #20] + 316c: 4628 mov r0, r5 + 316e: f7ff fd19 bl 2ba4 assert(rc == 0); - 3112: 2800 cmp r0, #0 - 3114: d156 bne.n 31c4 + 3172: 2800 cmp r0, #0 + 3174: d156 bne.n 3224 if (bs->use_scratch) { - 3116: 79a3 ldrb r3, [r4, #6] - 3118: 2b00 cmp r3, #0 - 311a: d02e beq.n 317a + 3176: 79a3 ldrb r3, [r4, #6] + 3178: 2b00 cmp r3, #0 + 317a: d02e beq.n 31da scratch_trailer_off = boot_status_off(fap_scratch); - 311c: 9805 ldr r0, [sp, #20] - 311e: f000 fb15 bl 374c + 317c: 9805 ldr r0, [sp, #20] + 317e: f000 fb15 bl 37ac rc = boot_copy_region(state, fap_scratch, fap_primary_slot, - 3122: 4446 add r6, r8 + 3182: 4446 add r6, r8 (BOOT_STATUS_STATE_COUNT - 1) * BOOT_WRITE_SZ(state)); - 3124: 6eab ldr r3, [r5, #104] ; 0x68 + 3184: 6eab ldr r3, [r5, #104] ; 0x68 rc = boot_copy_region(state, fap_scratch, fap_primary_slot, - 3126: 005b lsls r3, r3, #1 - 3128: 9301 str r3, [sp, #4] - 312a: 9600 str r6, [sp, #0] - 312c: 4603 mov r3, r0 - 312e: 9a07 ldr r2, [sp, #28] - 3130: 9905 ldr r1, [sp, #20] - 3132: 4628 mov r0, r5 - 3134: f7ff fd06 bl 2b44 + 3186: 005b lsls r3, r3, #1 + 3188: 9301 str r3, [sp, #4] + 318a: 9600 str r6, [sp, #0] + 318c: 4603 mov r3, r0 + 318e: 9a07 ldr r2, [sp, #28] + 3190: 9905 ldr r1, [sp, #20] + 3192: 4628 mov r0, r5 + 3194: f7ff fd06 bl 2ba4 BOOT_STATUS_ASSERT(rc == 0); - 3138: 2800 cmp r0, #0 - 313a: d149 bne.n 31d0 + 3198: 2800 cmp r0, #0 + 319a: d149 bne.n 3230 rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SCRATCH, - 313c: a903 add r1, sp, #12 - 313e: 2003 movs r0, #3 - 3140: f000 fb78 bl 3834 + 319c: a903 add r1, sp, #12 + 319e: 2003 movs r0, #3 + 31a0: f000 fb78 bl 3894 assert(rc == 0); - 3144: 2800 cmp r0, #0 - 3146: d149 bne.n 31dc + 31a4: 2800 cmp r0, #0 + 31a6: d149 bne.n 323c if (swap_state.image_ok == BOOT_FLAG_SET) { - 3148: f89d 300f ldrb.w r3, [sp, #15] - 314c: 2b01 cmp r3, #1 - 314e: d04b beq.n 31e8 + 31a8: f89d 300f ldrb.w r3, [sp, #15] + 31ac: 2b01 cmp r3, #1 + 31ae: d04b beq.n 3248 if (swap_state.swap_type != BOOT_SWAP_TYPE_NONE) { - 3150: f89d 100d ldrb.w r1, [sp, #13] - 3154: 2901 cmp r1, #1 - 3156: d005 beq.n 3164 + 31b0: f89d 100d ldrb.w r1, [sp, #13] + 31b4: 2901 cmp r1, #1 + 31b6: d005 beq.n 31c4 rc = boot_write_swap_info(fap_primary_slot, - 3158: 2200 movs r2, #0 - 315a: 9807 ldr r0, [sp, #28] - 315c: f000 fbb0 bl 38c0 + 31b8: 2200 movs r2, #0 + 31ba: 9807 ldr r0, [sp, #28] + 31bc: f000 fbb0 bl 3920 assert(rc == 0); - 3160: 2800 cmp r0, #0 - 3162: d14c bne.n 31fe + 31c0: 2800 cmp r0, #0 + 31c2: d14c bne.n 325e rc = boot_write_swap_size(fap_primary_slot, bs->swap_size); - 3164: 68a1 ldr r1, [r4, #8] - 3166: 9807 ldr r0, [sp, #28] - 3168: f000 fbcc bl 3904 + 31c4: 68a1 ldr r1, [r4, #8] + 31c6: 9807 ldr r0, [sp, #28] + 31c8: f000 fbcc bl 3964 assert(rc == 0); - 316c: 2800 cmp r0, #0 - 316e: d14c bne.n 320a + 31cc: 2800 cmp r0, #0 + 31ce: d14c bne.n 326a rc = boot_write_magic(fap_primary_slot); - 3170: 9807 ldr r0, [sp, #28] - 3172: f000 fb87 bl 3884 + 31d0: 9807 ldr r0, [sp, #28] + 31d2: f000 fb87 bl 38e4 assert(rc == 0); - 3176: 2800 cmp r0, #0 - 3178: d14d bne.n 3216 + 31d6: 2800 cmp r0, #0 + 31d8: d14d bne.n 3276 erase_scratch = bs->use_scratch; - 317a: 79a6 ldrb r6, [r4, #6] + 31da: 79a6 ldrb r6, [r4, #6] bs->use_scratch = 0; - 317c: 2300 movs r3, #0 - 317e: 71a3 strb r3, [r4, #6] + 31dc: 2300 movs r3, #0 + 31de: 71a3 strb r3, [r4, #6] rc = boot_write_status(state, bs); - 3180: 4621 mov r1, r4 - 3182: 4628 mov r0, r5 - 3184: f7ff fca6 bl 2ad4 + 31e0: 4621 mov r1, r4 + 31e2: 4628 mov r0, r5 + 31e4: f7ff fca6 bl 2b34 bs->idx++; - 3188: 6823 ldr r3, [r4, #0] - 318a: 3301 adds r3, #1 - 318c: 6023 str r3, [r4, #0] + 31e8: 6823 ldr r3, [r4, #0] + 31ea: 3301 adds r3, #1 + 31ec: 6023 str r3, [r4, #0] bs->state = BOOT_STATUS_STATE_0; - 318e: 2301 movs r3, #1 - 3190: 7123 strb r3, [r4, #4] + 31ee: 2301 movs r3, #1 + 31f0: 7123 strb r3, [r4, #4] BOOT_STATUS_ASSERT(rc == 0); - 3192: 2800 cmp r0, #0 - 3194: d145 bne.n 3222 + 31f2: 2800 cmp r0, #0 + 31f4: d145 bne.n 3282 if (erase_scratch) { - 3196: 2e00 cmp r6, #0 - 3198: f43f aef0 beq.w 2f7c + 31f6: 2e00 cmp r6, #0 + 31f8: f43f aef0 beq.w 2fdc rc = boot_erase_region(fap_scratch, 0, sz); - 319c: 463a mov r2, r7 - 319e: 2100 movs r1, #0 - 31a0: 9805 ldr r0, [sp, #20] - 31a2: f7ff fccb bl 2b3c + 31fc: 463a mov r2, r7 + 31fe: 2100 movs r1, #0 + 3200: 9805 ldr r0, [sp, #20] + 3202: f7ff fccb bl 2b9c assert(rc == 0); - 31a6: 2800 cmp r0, #0 - 31a8: f43f aee8 beq.w 2f7c - 31ac: 2300 movs r3, #0 - 31ae: 461a mov r2, r3 - 31b0: 4619 mov r1, r3 - 31b2: 4618 mov r0, r3 - 31b4: f7fe faaa bl 170c <__assert_func> + 3206: 2800 cmp r0, #0 + 3208: f43f aee8 beq.w 2fdc + 320c: 2300 movs r3, #0 + 320e: 461a mov r2, r3 + 3210: 4619 mov r1, r3 + 3212: 4618 mov r0, r3 + 3214: f7fe fa7a bl 170c <__assert_func> assert(rc == 0); - 31b8: 2300 movs r3, #0 - 31ba: 461a mov r2, r3 - 31bc: 4619 mov r1, r3 - 31be: 4618 mov r0, r3 - 31c0: f7fe faa4 bl 170c <__assert_func> + 3218: 2300 movs r3, #0 + 321a: 461a mov r2, r3 + 321c: 4619 mov r1, r3 + 321e: 4618 mov r0, r3 + 3220: f7fe fa74 bl 170c <__assert_func> assert(rc == 0); - 31c4: 2300 movs r3, #0 - 31c6: 461a mov r2, r3 - 31c8: 4619 mov r1, r3 - 31ca: 4618 mov r0, r3 - 31cc: f7fe fa9e bl 170c <__assert_func> + 3224: 2300 movs r3, #0 + 3226: 461a mov r2, r3 + 3228: 4619 mov r1, r3 + 322a: 4618 mov r0, r3 + 322c: f7fe fa6e bl 170c <__assert_func> BOOT_STATUS_ASSERT(rc == 0); - 31d0: 2300 movs r3, #0 - 31d2: 461a mov r2, r3 - 31d4: 4619 mov r1, r3 - 31d6: 4618 mov r0, r3 - 31d8: f7fe fa98 bl 170c <__assert_func> + 3230: 2300 movs r3, #0 + 3232: 461a mov r2, r3 + 3234: 4619 mov r1, r3 + 3236: 4618 mov r0, r3 + 3238: f7fe fa68 bl 170c <__assert_func> assert(rc == 0); - 31dc: 2300 movs r3, #0 - 31de: 461a mov r2, r3 - 31e0: 4619 mov r1, r3 - 31e2: 4618 mov r0, r3 - 31e4: f7fe fa92 bl 170c <__assert_func> + 323c: 2300 movs r3, #0 + 323e: 461a mov r2, r3 + 3240: 4619 mov r1, r3 + 3242: 4618 mov r0, r3 + 3244: f7fe fa62 bl 170c <__assert_func> rc = boot_write_image_ok(fap_primary_slot); - 31e8: 9807 ldr r0, [sp, #28] - 31ea: f000 fb62 bl 38b2 + 3248: 9807 ldr r0, [sp, #28] + 324a: f000 fb62 bl 3912 assert(rc == 0); - 31ee: 2800 cmp r0, #0 - 31f0: d0ae beq.n 3150 - 31f2: 2300 movs r3, #0 - 31f4: 461a mov r2, r3 - 31f6: 4619 mov r1, r3 - 31f8: 4618 mov r0, r3 - 31fa: f7fe fa87 bl 170c <__assert_func> + 324e: 2800 cmp r0, #0 + 3250: d0ae beq.n 31b0 + 3252: 2300 movs r3, #0 + 3254: 461a mov r2, r3 + 3256: 4619 mov r1, r3 + 3258: 4618 mov r0, r3 + 325a: f7fe fa57 bl 170c <__assert_func> assert(rc == 0); - 31fe: 2300 movs r3, #0 - 3200: 461a mov r2, r3 - 3202: 4619 mov r1, r3 - 3204: 4618 mov r0, r3 - 3206: f7fe fa81 bl 170c <__assert_func> + 325e: 2300 movs r3, #0 + 3260: 461a mov r2, r3 + 3262: 4619 mov r1, r3 + 3264: 4618 mov r0, r3 + 3266: f7fe fa51 bl 170c <__assert_func> assert(rc == 0); - 320a: 2300 movs r3, #0 - 320c: 461a mov r2, r3 - 320e: 4619 mov r1, r3 - 3210: 4618 mov r0, r3 - 3212: f7fe fa7b bl 170c <__assert_func> + 326a: 2300 movs r3, #0 + 326c: 461a mov r2, r3 + 326e: 4619 mov r1, r3 + 3270: 4618 mov r0, r3 + 3272: f7fe fa4b bl 170c <__assert_func> assert(rc == 0); - 3216: 2300 movs r3, #0 - 3218: 461a mov r2, r3 - 321a: 4619 mov r1, r3 - 321c: 4618 mov r0, r3 - 321e: f7fe fa75 bl 170c <__assert_func> + 3276: 2300 movs r3, #0 + 3278: 461a mov r2, r3 + 327a: 4619 mov r1, r3 + 327c: 4618 mov r0, r3 + 327e: f7fe fa45 bl 170c <__assert_func> BOOT_STATUS_ASSERT(rc == 0); - 3222: 2300 movs r3, #0 - 3224: 461a mov r2, r3 - 3226: 4619 mov r1, r3 - 3228: 4618 mov r0, r3 - 322a: f7fe fa6f bl 170c <__assert_func> + 3282: 2300 movs r3, #0 + 3284: 461a mov r2, r3 + 3286: 4619 mov r1, r3 + 3288: 4618 mov r0, r3 + 328a: f7fe fa3f bl 170c <__assert_func> -0000322e : +0000328e : { - 322e: b510 push {r4, lr} - 3230: b082 sub sp, #8 - 3232: 4614 mov r4, r2 + 328e: b510 push {r4, lr} + 3290: b082 sub sp, #8 + 3292: 4614 mov r4, r2 area_id = flash_area_id_from_multi_image_slot(BOOT_CURR_IMG(state), slot); - 3234: 2000 movs r0, #0 - 3236: f000 fd40 bl 3cba + 3294: 2000 movs r0, #0 + 3296: f000 fd40 bl 3d1a rc = flash_area_open(area_id, &fap); - 323a: a901 add r1, sp, #4 - 323c: b2c0 uxtb r0, r0 - 323e: f001 fb9f bl 4980 + 329a: a901 add r1, sp, #4 + 329c: b2c0 uxtb r0, r0 + 329e: f001 fb9f bl 49e0 if (rc != 0) { - 3242: b118 cbz r0, 324c + 32a2: b118 cbz r0, 32ac rc = BOOT_EFLASH; - 3244: 2301 movs r3, #1 + 32a4: 2301 movs r3, #1 } - 3246: 4618 mov r0, r3 - 3248: b002 add sp, #8 - 324a: bd10 pop {r4, pc} + 32a6: 4618 mov r0, r3 + 32a8: b002 add sp, #8 + 32aa: bd10 pop {r4, pc} rc = flash_area_read(fap, 0, out_hdr, sizeof *out_hdr); - 324c: 2320 movs r3, #32 - 324e: 4622 mov r2, r4 - 3250: 2100 movs r1, #0 - 3252: 9801 ldr r0, [sp, #4] - 3254: f001 fbf2 bl 4a3c + 32ac: 2320 movs r3, #32 + 32ae: 4622 mov r2, r4 + 32b0: 2100 movs r1, #0 + 32b2: 9801 ldr r0, [sp, #4] + 32b4: f001 fbf2 bl 4a9c if (rc != 0) { - 3258: 4603 mov r3, r0 - 325a: 2800 cmp r0, #0 - 325c: d0f3 beq.n 3246 + 32b8: 4603 mov r3, r0 + 32ba: 2800 cmp r0, #0 + 32bc: d0f3 beq.n 32a6 rc = BOOT_EFLASH; - 325e: 2301 movs r3, #1 - 3260: e7f1 b.n 3246 + 32be: 2301 movs r3, #1 + 32c0: e7f1 b.n 32a6 ... -00003264 : +000032c4 : { - 3264: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} - 3268: b083 sub sp, #12 - 326a: 4606 mov r6, r0 - 326c: 4689 mov r9, r1 - 326e: 4693 mov fp, r2 + 32c4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} + 32c8: b083 sub sp, #12 + 32ca: 4606 mov r6, r0 + 32cc: 4689 mov r9, r1 + 32ce: 4693 mov fp, r2 off = boot_status_off(fap); - 3270: f000 fa6c bl 374c - 3274: 4680 mov r8, r0 + 32d0: f000 fa6c bl 37ac + 32d4: 4680 mov r8, r0 max_entries = boot_status_entries(BOOT_CURR_IMG(state), fap); - 3276: 4631 mov r1, r6 - 3278: 2000 movs r0, #0 - 327a: f000 fa58 bl 372e + 32d6: 4631 mov r1, r6 + 32d8: 2000 movs r0, #0 + 32da: f000 fa58 bl 378e if (max_entries < 0) { - 327e: 1e07 subs r7, r0, #0 - 3280: db42 blt.n 3308 + 32de: 1e07 subs r7, r0, #0 + 32e0: db42 blt.n 3368 for (i = 0; i < max_entries; i++) { - 3282: 2400 movs r4, #0 + 32e2: 2400 movs r4, #0 found_idx = 0; - 3284: 46a2 mov sl, r4 + 32e4: 46a2 mov sl, r4 found = 0; - 3286: 4625 mov r5, r4 - 3288: e007 b.n 329a + 32e6: 4625 mov r5, r4 + 32e8: e007 b.n 32fa if (found && !found_idx) { - 328a: b12d cbz r5, 3298 - 328c: f1ba 0f00 cmp.w sl, #0 - 3290: d102 bne.n 3298 + 32ea: b12d cbz r5, 32f8 + 32ec: f1ba 0f00 cmp.w sl, #0 + 32f0: d102 bne.n 32f8 found_idx = i; - 3292: 46a2 mov sl, r4 - 3294: e000 b.n 3298 + 32f2: 46a2 mov sl, r4 + 32f4: e000 b.n 32f8 found = 1; - 3296: 2501 movs r5, #1 + 32f6: 2501 movs r5, #1 for (i = 0; i < max_entries; i++) { - 3298: 3401 adds r4, #1 - 329a: 42bc cmp r4, r7 - 329c: da14 bge.n 32c8 + 32f8: 3401 adds r4, #1 + 32fa: 42bc cmp r4, r7 + 32fc: da14 bge.n 3328 rc = flash_area_read_is_empty(fap, off + i * BOOT_WRITE_SZ(state), - 329e: f8d9 1068 ldr.w r1, [r9, #104] ; 0x68 - 32a2: 2301 movs r3, #1 - 32a4: f10d 0207 add.w r2, sp, #7 - 32a8: fb01 8104 mla r1, r1, r4, r8 - 32ac: 4630 mov r0, r6 - 32ae: f001 fc08 bl 4ac2 + 32fe: f8d9 1068 ldr.w r1, [r9, #104] ; 0x68 + 3302: 2301 movs r3, #1 + 3304: f10d 0207 add.w r2, sp, #7 + 3308: fb01 8104 mla r1, r1, r4, r8 + 330c: 4630 mov r0, r6 + 330e: f001 fc08 bl 4b22 if (rc < 0) { - 32b2: 2800 cmp r0, #0 - 32b4: db2a blt.n 330c + 3312: 2800 cmp r0, #0 + 3314: db2a blt.n 336c if (rc == 1) { - 32b6: 2801 cmp r0, #1 - 32b8: d0e7 beq.n 328a + 3316: 2801 cmp r0, #1 + 3318: d0e7 beq.n 32ea } else if (!found) { - 32ba: 2d00 cmp r5, #0 - 32bc: d0eb beq.n 3296 + 331a: 2d00 cmp r5, #0 + 331c: d0eb beq.n 32f6 } else if (found_idx) { - 32be: f1ba 0f00 cmp.w sl, #0 - 32c2: d0e9 beq.n 3298 + 331e: f1ba 0f00 cmp.w sl, #0 + 3322: d0e9 beq.n 32f8 invalid = 1; - 32c4: 4629 mov r1, r5 - 32c6: e000 b.n 32ca + 3324: 4629 mov r1, r5 + 3326: e000 b.n 332a invalid = 0; - 32c8: 2100 movs r1, #0 + 3328: 2100 movs r1, #0 if (invalid) { - 32ca: b9a1 cbnz r1, 32f6 + 332a: b9a1 cbnz r1, 3356 if (found) { - 32cc: b1fd cbz r5, 330e + 332c: b1fd cbz r5, 336e if (!found_idx) { - 32ce: f1ba 0f00 cmp.w sl, #0 - 32d2: d000 beq.n 32d6 - 32d4: 4654 mov r4, sl + 332e: f1ba 0f00 cmp.w sl, #0 + 3332: d000 beq.n 3336 + 3334: 4654 mov r4, sl bs->idx = (found_idx / BOOT_STATUS_STATE_COUNT) + 1; - 32d6: 4b10 ldr r3, [pc, #64] ; (3318 ) - 32d8: fb83 2304 smull r2, r3, r3, r4 - 32dc: eba3 73e4 sub.w r3, r3, r4, asr #31 - 32e0: 1c5a adds r2, r3, #1 - 32e2: f8cb 2000 str.w r2, [fp] + 3336: 4b10 ldr r3, [pc, #64] ; (3378 ) + 3338: fb83 2304 smull r2, r3, r3, r4 + 333c: eba3 73e4 sub.w r3, r3, r4, asr #31 + 3340: 1c5a adds r2, r3, #1 + 3342: f8cb 2000 str.w r2, [fp] bs->state = (found_idx % BOOT_STATUS_STATE_COUNT) + 1; - 32e6: eb03 0343 add.w r3, r3, r3, lsl #1 - 32ea: 1ae2 subs r2, r4, r3 - 32ec: 1c53 adds r3, r2, #1 - 32ee: f88b 3004 strb.w r3, [fp, #4] + 3346: eb03 0343 add.w r3, r3, r3, lsl #1 + 334a: 1ae2 subs r2, r4, r3 + 334c: 1c53 adds r3, r2, #1 + 334e: f88b 3004 strb.w r3, [fp, #4] return 0; - 32f2: 460d mov r5, r1 - 32f4: e00b b.n 330e + 3352: 460d mov r5, r1 + 3354: e00b b.n 336e BOOT_LOG_ERR("Detected inconsistent status!"); - 32f6: 4809 ldr r0, [pc, #36] ; (331c ) - 32f8: f001 f814 bl 4324 + 3356: 4809 ldr r0, [pc, #36] ; (337c ) + 3358: f001 f814 bl 4384 assert(0); - 32fc: 2300 movs r3, #0 - 32fe: 461a mov r2, r3 - 3300: 4619 mov r1, r3 - 3302: 4618 mov r0, r3 - 3304: f7fe fa02 bl 170c <__assert_func> + 335c: 2300 movs r3, #0 + 335e: 461a mov r2, r3 + 3360: 4619 mov r1, r3 + 3362: 4618 mov r0, r3 + 3364: f7fe f9d2 bl 170c <__assert_func> return BOOT_EBADARGS; - 3308: 2507 movs r5, #7 - 330a: e000 b.n 330e + 3368: 2507 movs r5, #7 + 336a: e000 b.n 336e return BOOT_EFLASH; - 330c: 2501 movs r5, #1 + 336c: 2501 movs r5, #1 } - 330e: 4628 mov r0, r5 - 3310: b003 add sp, #12 - 3312: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} - 3316: bf00 nop - 3318: 55555556 .word 0x55555556 - 331c: 00005590 .word 0x00005590 + 336e: 4628 mov r0, r5 + 3370: b003 add sp, #12 + 3372: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} + 3376: bf00 nop + 3378: 55555556 .word 0x55555556 + 337c: 00005638 .word 0x00005638 -00003320 : +00003380 : { - 3320: b410 push {r4} + 3380: b410 push {r4} idx_sz = elem_sz * BOOT_STATUS_STATE_COUNT; - 3322: eb01 0441 add.w r4, r1, r1, lsl #1 + 3382: eb01 0441 add.w r4, r1, r1, lsl #1 return (bs->idx - BOOT_STATUS_IDX_0) * idx_sz + - 3326: 6803 ldr r3, [r0, #0] - 3328: 3b01 subs r3, #1 + 3386: 6803 ldr r3, [r0, #0] + 3388: 3b01 subs r3, #1 (bs->state - BOOT_STATUS_STATE_0) * elem_sz; - 332a: 7902 ldrb r2, [r0, #4] - 332c: 3a01 subs r2, #1 - 332e: fb01 f102 mul.w r1, r1, r2 + 338a: 7902 ldrb r2, [r0, #4] + 338c: 3a01 subs r2, #1 + 338e: fb01 f102 mul.w r1, r1, r2 } - 3332: fb03 1004 mla r0, r3, r4, r1 - 3336: bc10 pop {r4} - 3338: 4770 bx lr + 3392: fb03 1004 mla r0, r3, r4, r1 + 3396: bc10 pop {r4} + 3398: 4770 bx lr ... -0000333c : +0000339c : { - 333c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} + 339c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} return BOOT_IMG(state, slot).num_sectors; - 3340: 6a87 ldr r7, [r0, #40] ; 0x28 - 3342: f8d0 c054 ldr.w ip, [r0, #84] ; 0x54 + 33a0: 6a87 ldr r7, [r0, #40] ; 0x28 + 33a2: f8d0 c054 ldr.w ip, [r0, #84] ; 0x54 if ((num_sectors_primary > BOOT_MAX_IMG_SECTORS) || - 3346: 2f80 cmp r7, #128 ; 0x80 - 3348: d80d bhi.n 3366 - 334a: f1bc 0f80 cmp.w ip, #128 ; 0x80 - 334e: d80a bhi.n 3366 - 3350: 6d83 ldr r3, [r0, #88] ; 0x58 - 3352: f8d3 8008 ldr.w r8, [r3, #8] + 33a6: 2f80 cmp r7, #128 ; 0x80 + 33a8: d80d bhi.n 33c6 + 33aa: f1bc 0f80 cmp.w ip, #128 ; 0x80 + 33ae: d80a bhi.n 33c6 + 33b0: 6d83 ldr r3, [r0, #88] ; 0x58 + 33b2: f8d3 8008 ldr.w r8, [r3, #8] smaller = 0; - 3356: 2500 movs r5, #0 + 33b6: 2500 movs r5, #0 j = sz1 = secondary_slot_sz = 0; - 3358: 462c mov r4, r5 + 33b8: 462c mov r4, r5 i = sz0 = primary_slot_sz = 0; - 335a: 4629 mov r1, r5 + 33ba: 4629 mov r1, r5 j = sz1 = secondary_slot_sz = 0; - 335c: 46a9 mov r9, r5 + 33bc: 46a9 mov r9, r5 i = sz0 = primary_slot_sz = 0; - 335e: 46ae mov lr, r5 + 33be: 46ae mov lr, r5 j = sz1 = secondary_slot_sz = 0; - 3360: 462a mov r2, r5 + 33c0: 462a mov r2, r5 i = sz0 = primary_slot_sz = 0; - 3362: 462b mov r3, r5 + 33c2: 462b mov r3, r5 while (i < num_sectors_primary || j < num_sectors_secondary) { - 3364: e019 b.n 339a + 33c4: e019 b.n 33fa BOOT_LOG_WRN("Cannot upgrade: more sectors than allowed"); - 3366: 4831 ldr r0, [pc, #196] ; (342c ) - 3368: f000 ffdc bl 4324 + 33c6: 4831 ldr r0, [pc, #196] ; (348c ) + 33c8: f000 ffdc bl 4384 return 0; - 336c: 2000 movs r0, #0 + 33cc: 2000 movs r0, #0 } - 336e: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} + 33ce: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} return BOOT_IMG(state, slot).sectors[sector].fa_size; - 3372: 6a46 ldr r6, [r0, #36] ; 0x24 - 3374: eb01 0b41 add.w fp, r1, r1, lsl #1 - 3378: ea4f 0a8b mov.w sl, fp, lsl #2 - 337c: 4456 add r6, sl - 337e: 68b6 ldr r6, [r6, #8] + 33d2: 6a46 ldr r6, [r0, #36] ; 0x24 + 33d4: eb01 0b41 add.w fp, r1, r1, lsl #1 + 33d8: ea4f 0a8b mov.w sl, fp, lsl #2 + 33dc: 4456 add r6, sl + 33de: 68b6 ldr r6, [r6, #8] sz0 += boot_img_sector_size(state, BOOT_PRIMARY_SLOT, i); - 3380: 4433 add r3, r6 - 3382: 6d06 ldr r6, [r0, #80] ; 0x50 - 3384: eb04 0b44 add.w fp, r4, r4, lsl #1 - 3388: ea4f 0a8b mov.w sl, fp, lsl #2 - 338c: 4456 add r6, sl - 338e: 68b6 ldr r6, [r6, #8] + 33e0: 4433 add r3, r6 + 33e2: 6d06 ldr r6, [r0, #80] ; 0x50 + 33e4: eb04 0b44 add.w fp, r4, r4, lsl #1 + 33e8: ea4f 0a8b mov.w sl, fp, lsl #2 + 33ec: 4456 add r6, sl + 33ee: 68b6 ldr r6, [r6, #8] sz1 += boot_img_sector_size(state, BOOT_SECONDARY_SLOT, j); - 3390: 4432 add r2, r6 + 33f0: 4432 add r2, r6 i++; - 3392: 3101 adds r1, #1 + 33f2: 3101 adds r1, #1 j++; - 3394: 3401 adds r4, #1 + 33f4: 3401 adds r4, #1 if (sz0 == sz1) { - 3396: 4293 cmp r3, r2 - 3398: d02b beq.n 33f2 + 33f6: 4293 cmp r3, r2 + 33f8: d02b beq.n 3452 while (i < num_sectors_primary || j < num_sectors_secondary) { - 339a: 42b9 cmp r1, r7 - 339c: d301 bcc.n 33a2 - 339e: 4564 cmp r4, ip - 33a0: d236 bcs.n 3410 + 33fa: 42b9 cmp r1, r7 + 33fc: d301 bcc.n 3402 + 33fe: 4564 cmp r4, ip + 3400: d236 bcs.n 3470 if (sz0 == sz1) { - 33a2: 4293 cmp r3, r2 - 33a4: d0e5 beq.n 3372 + 3402: 4293 cmp r3, r2 + 3404: d0e5 beq.n 33d2 } else if (sz0 < sz1) { - 33a6: 4293 cmp r3, r2 - 33a8: d211 bcs.n 33ce - 33aa: 6a46 ldr r6, [r0, #36] ; 0x24 - 33ac: eb01 0b41 add.w fp, r1, r1, lsl #1 - 33b0: ea4f 0a8b mov.w sl, fp, lsl #2 - 33b4: 4456 add r6, sl - 33b6: 68b6 ldr r6, [r6, #8] + 3406: 4293 cmp r3, r2 + 3408: d211 bcs.n 342e + 340a: 6a46 ldr r6, [r0, #36] ; 0x24 + 340c: eb01 0b41 add.w fp, r1, r1, lsl #1 + 3410: ea4f 0a8b mov.w sl, fp, lsl #2 + 3414: 4456 add r6, sl + 3416: 68b6 ldr r6, [r6, #8] sz0 += boot_img_sector_size(state, BOOT_PRIMARY_SLOT, i); - 33b8: 4433 add r3, r6 + 3418: 4433 add r3, r6 if (smaller == 2) { - 33ba: 2d02 cmp r5, #2 - 33bc: d002 beq.n 33c4 + 341a: 2d02 cmp r5, #2 + 341c: d002 beq.n 3424 i++; - 33be: 3101 adds r1, #1 + 341e: 3101 adds r1, #1 smaller = 1; - 33c0: 2501 movs r5, #1 - 33c2: e7e8 b.n 3396 + 3420: 2501 movs r5, #1 + 3422: e7e8 b.n 33f6 BOOT_LOG_WRN("Cannot upgrade: slots have non-compatible sectors"); - 33c4: 481a ldr r0, [pc, #104] ; (3430 ) - 33c6: f000 ffad bl 4324 + 3424: 481a ldr r0, [pc, #104] ; (3490 ) + 3426: f000 ffad bl 4384 return 0; - 33ca: 2000 movs r0, #0 - 33cc: e7cf b.n 336e - 33ce: 6d06 ldr r6, [r0, #80] ; 0x50 - 33d0: eb04 0b44 add.w fp, r4, r4, lsl #1 - 33d4: ea4f 0a8b mov.w sl, fp, lsl #2 - 33d8: 4456 add r6, sl - 33da: 68b6 ldr r6, [r6, #8] + 342a: 2000 movs r0, #0 + 342c: e7cf b.n 33ce + 342e: 6d06 ldr r6, [r0, #80] ; 0x50 + 3430: eb04 0b44 add.w fp, r4, r4, lsl #1 + 3434: ea4f 0a8b mov.w sl, fp, lsl #2 + 3438: 4456 add r6, sl + 343a: 68b6 ldr r6, [r6, #8] sz1 += boot_img_sector_size(state, BOOT_SECONDARY_SLOT, j); - 33dc: 4432 add r2, r6 + 343c: 4432 add r2, r6 if (smaller == 1) { - 33de: 2d01 cmp r5, #1 - 33e0: d002 beq.n 33e8 + 343e: 2d01 cmp r5, #1 + 3440: d002 beq.n 3448 j++; - 33e2: 3401 adds r4, #1 + 3442: 3401 adds r4, #1 smaller = 2; - 33e4: 2502 movs r5, #2 - 33e6: e7d6 b.n 3396 + 3444: 2502 movs r5, #2 + 3446: e7d6 b.n 33f6 BOOT_LOG_WRN("Cannot upgrade: slots have non-compatible sectors"); - 33e8: 4811 ldr r0, [pc, #68] ; (3430 ) - 33ea: f000 ff9b bl 4324 + 3448: 4811 ldr r0, [pc, #68] ; (3490 ) + 344a: f000 ff9b bl 4384 return 0; - 33ee: 2000 movs r0, #0 - 33f0: e7bd b.n 336e + 344e: 2000 movs r0, #0 + 3450: e7bd b.n 33ce primary_slot_sz += sz0; - 33f2: 449e add lr, r3 + 3452: 449e add lr, r3 secondary_slot_sz += sz1; - 33f4: 4491 add r9, r2 + 3454: 4491 add r9, r2 if (sz0 > scratch_sz || sz1 > scratch_sz) { - 33f6: 4543 cmp r3, r8 - 33f8: d805 bhi.n 3406 - 33fa: 4542 cmp r2, r8 - 33fc: d803 bhi.n 3406 + 3456: 4543 cmp r3, r8 + 3458: d805 bhi.n 3466 + 345a: 4542 cmp r2, r8 + 345c: d803 bhi.n 3466 smaller = sz0 = sz1 = 0; - 33fe: 2500 movs r5, #0 - 3400: 462a mov r2, r5 - 3402: 462b mov r3, r5 - 3404: e7c9 b.n 339a + 345e: 2500 movs r5, #0 + 3460: 462a mov r2, r5 + 3462: 462b mov r3, r5 + 3464: e7c9 b.n 33fa BOOT_LOG_WRN("Cannot upgrade: not all sectors fit inside scratch"); - 3406: 480b ldr r0, [pc, #44] ; (3434 ) - 3408: f000 ff8c bl 4324 + 3466: 480b ldr r0, [pc, #44] ; (3494 ) + 3468: f000 ff8c bl 4384 return 0; - 340c: 2000 movs r0, #0 - 340e: e7ae b.n 336e + 346c: 2000 movs r0, #0 + 346e: e7ae b.n 33ce if ((i != num_sectors_primary) || - 3410: 42b9 cmp r1, r7 - 3412: d101 bne.n 3418 - 3414: 4564 cmp r4, ip - 3416: d004 beq.n 3422 + 3470: 42b9 cmp r1, r7 + 3472: d101 bne.n 3478 + 3474: 4564 cmp r4, ip + 3476: d004 beq.n 3482 BOOT_LOG_WRN("Cannot upgrade: slots are not compatible"); - 3418: 4807 ldr r0, [pc, #28] ; (3438 ) - 341a: f000 ff83 bl 4324 + 3478: 4807 ldr r0, [pc, #28] ; (3498 ) + 347a: f000 ff83 bl 4384 return 0; - 341e: 2000 movs r0, #0 - 3420: e7a5 b.n 336e + 347e: 2000 movs r0, #0 + 3480: e7a5 b.n 33ce (j != num_sectors_secondary) || - 3422: 45ce cmp lr, r9 - 3424: d1f8 bne.n 3418 + 3482: 45ce cmp lr, r9 + 3484: d1f8 bne.n 3478 return 1; - 3426: 2001 movs r0, #1 - 3428: e7a1 b.n 336e - 342a: bf00 nop - 342c: 000054ac .word 0x000054ac - 3430: 000054dc .word 0x000054dc - 3434: 00005514 .word 0x00005514 - 3438: 00005550 .word 0x00005550 - -0000343c : -{ - 343c: b530 push {r4, r5, lr} - 343e: b087 sub sp, #28 + 3486: 2001 movs r0, #1 + 3488: e7a1 b.n 33ce + 348a: bf00 nop + 348c: 00005554 .word 0x00005554 + 3490: 00005584 .word 0x00005584 + 3494: 000055bc .word 0x000055bc + 3498: 000055f8 .word 0x000055f8 + +0000349c : +{ + 349c: b530 push {r4, r5, lr} + 349e: b087 sub sp, #28 rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_PRIMARY(image_index), - 3440: a902 add r1, sp, #8 - 3442: 2001 movs r0, #1 - 3444: f000 f9f6 bl 3834 + 34a0: a902 add r1, sp, #8 + 34a2: 2001 movs r0, #1 + 34a4: f000 f9f6 bl 3894 assert(rc == 0); - 3448: bb68 cbnz r0, 34a6 + 34a8: bb68 cbnz r0, 3506 rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SCRATCH, &state_scratch); - 344a: a904 add r1, sp, #16 - 344c: 2003 movs r0, #3 - 344e: f000 f9f1 bl 3834 + 34aa: a904 add r1, sp, #16 + 34ac: 2003 movs r0, #3 + 34ae: f000 f9f1 bl 3894 assert(rc == 0); - 3452: 4605 mov r5, r0 - 3454: bb68 cbnz r0, 34b2 + 34b2: 4605 mov r5, r0 + 34b4: bb68 cbnz r0, 3512 BOOT_LOG_SWAP_STATE("Primary image", &state_primary_slot); - 3456: f89d 3008 ldrb.w r3, [sp, #8] - 345a: 2b01 cmp r3, #1 - 345c: d031 beq.n 34c2 - 345e: 2b03 cmp r3, #3 - 3460: d02d beq.n 34be - 3462: 4a38 ldr r2, [pc, #224] ; (3544 ) - 3464: f89d 3009 ldrb.w r3, [sp, #9] - 3468: f89d 100a ldrb.w r1, [sp, #10] - 346c: f89d 000b ldrb.w r0, [sp, #11] - 3470: 9001 str r0, [sp, #4] - 3472: 9100 str r1, [sp, #0] - 3474: 4934 ldr r1, [pc, #208] ; (3548 ) - 3476: 4835 ldr r0, [pc, #212] ; (354c ) - 3478: f001 fa2a bl 48d0 + 34b6: f89d 3008 ldrb.w r3, [sp, #8] + 34ba: 2b01 cmp r3, #1 + 34bc: d031 beq.n 3522 + 34be: 2b03 cmp r3, #3 + 34c0: d02d beq.n 351e + 34c2: 4a38 ldr r2, [pc, #224] ; (35a4 ) + 34c4: f89d 3009 ldrb.w r3, [sp, #9] + 34c8: f89d 100a ldrb.w r1, [sp, #10] + 34cc: f89d 000b ldrb.w r0, [sp, #11] + 34d0: 9001 str r0, [sp, #4] + 34d2: 9100 str r1, [sp, #0] + 34d4: 4934 ldr r1, [pc, #208] ; (35a8 ) + 34d6: 4835 ldr r0, [pc, #212] ; (35ac ) + 34d8: f001 fa2a bl 4930 BOOT_LOG_SWAP_STATE("Scratch", &state_scratch); - 347c: f89d 3010 ldrb.w r3, [sp, #16] - 3480: 2b01 cmp r3, #1 - 3482: d022 beq.n 34ca - 3484: 2b03 cmp r3, #3 - 3486: d01e beq.n 34c6 - 3488: 4a2e ldr r2, [pc, #184] ; (3544 ) - 348a: f89d 3011 ldrb.w r3, [sp, #17] - 348e: f89d 1012 ldrb.w r1, [sp, #18] - 3492: f89d 0013 ldrb.w r0, [sp, #19] - 3496: 9001 str r0, [sp, #4] - 3498: 9100 str r1, [sp, #0] - 349a: 492d ldr r1, [pc, #180] ; (3550 ) - 349c: 482b ldr r0, [pc, #172] ; (354c ) - 349e: f001 fa17 bl 48d0 + 34dc: f89d 3010 ldrb.w r3, [sp, #16] + 34e0: 2b01 cmp r3, #1 + 34e2: d022 beq.n 352a + 34e4: 2b03 cmp r3, #3 + 34e6: d01e beq.n 3526 + 34e8: 4a2e ldr r2, [pc, #184] ; (35a4 ) + 34ea: f89d 3011 ldrb.w r3, [sp, #17] + 34ee: f89d 1012 ldrb.w r1, [sp, #18] + 34f2: f89d 0013 ldrb.w r0, [sp, #19] + 34f6: 9001 str r0, [sp, #4] + 34f8: 9100 str r1, [sp, #0] + 34fa: 492d ldr r1, [pc, #180] ; (35b0 ) + 34fc: 482b ldr r0, [pc, #172] ; (35ac ) + 34fe: f001 fa17 bl 4930 for (i = 0; i < BOOT_STATUS_TABLES_COUNT; i++) { - 34a2: 2400 movs r4, #0 - 34a4: e01d b.n 34e2 + 3502: 2400 movs r4, #0 + 3504: e01d b.n 3542 assert(rc == 0); - 34a6: 2300 movs r3, #0 - 34a8: 461a mov r2, r3 - 34aa: 4619 mov r1, r3 - 34ac: 4618 mov r0, r3 - 34ae: f7fe f92d bl 170c <__assert_func> + 3506: 2300 movs r3, #0 + 3508: 461a mov r2, r3 + 350a: 4619 mov r1, r3 + 350c: 4618 mov r0, r3 + 350e: f7fe f8fd bl 170c <__assert_func> assert(rc == 0); - 34b2: 2300 movs r3, #0 - 34b4: 461a mov r2, r3 - 34b6: 4619 mov r1, r3 - 34b8: 4618 mov r0, r3 - 34ba: f7fe f927 bl 170c <__assert_func> + 3512: 2300 movs r3, #0 + 3514: 461a mov r2, r3 + 3516: 4619 mov r1, r3 + 3518: 4618 mov r0, r3 + 351a: f7fe f8f7 bl 170c <__assert_func> BOOT_LOG_SWAP_STATE("Primary image", &state_primary_slot); - 34be: 4a25 ldr r2, [pc, #148] ; (3554 ) - 34c0: e7d0 b.n 3464 - 34c2: 4a25 ldr r2, [pc, #148] ; (3558 ) - 34c4: e7ce b.n 3464 + 351e: 4a25 ldr r2, [pc, #148] ; (35b4 ) + 3520: e7d0 b.n 34c4 + 3522: 4a25 ldr r2, [pc, #148] ; (35b8 ) + 3524: e7ce b.n 34c4 BOOT_LOG_SWAP_STATE("Scratch", &state_scratch); - 34c6: 4a23 ldr r2, [pc, #140] ; (3554 ) - 34c8: e7df b.n 348a - 34ca: 4a23 ldr r2, [pc, #140] ; (3558 ) - 34cc: e7dd b.n 348a + 3526: 4a23 ldr r2, [pc, #140] ; (35b4 ) + 3528: e7df b.n 34ea + 352a: 4a23 ldr r2, [pc, #140] ; (35b8 ) + 352c: e7dd b.n 34ea BOOT_LOG_INF("Boot source: %s", - 34ce: 4923 ldr r1, [pc, #140] ; (355c ) - 34d0: e000 b.n 34d4 - 34d2: 4923 ldr r1, [pc, #140] ; (3560 ) - 34d4: 4823 ldr r0, [pc, #140] ; (3564 ) - 34d6: f001 f9fb bl 48d0 + 352e: 4923 ldr r1, [pc, #140] ; (35bc ) + 3530: e000 b.n 3534 + 3532: 4923 ldr r1, [pc, #140] ; (35c0 ) + 3534: 4823 ldr r0, [pc, #140] ; (35c4 ) + 3536: f001 f9fb bl 4930 return source; - 34da: e030 b.n 353e + 353a: e030 b.n 359e BOOT_LOG_INF("Boot source: %s", - 34dc: 4922 ldr r1, [pc, #136] ; (3568 ) - 34de: e7f9 b.n 34d4 + 353c: 4922 ldr r1, [pc, #136] ; (35c8 ) + 353e: e7f9 b.n 3534 for (i = 0; i < BOOT_STATUS_TABLES_COUNT; i++) { - 34e0: 3401 adds r4, #1 - 34e2: 2c03 cmp r4, #3 - 34e4: d828 bhi.n 3538 + 3540: 3401 adds r4, #1 + 3542: 2c03 cmp r4, #3 + 3544: d828 bhi.n 3598 if (boot_magic_compatible_check(table->bst_magic_primary_slot, - 34e6: f89d 1008 ldrb.w r1, [sp, #8] - 34ea: 4b20 ldr r3, [pc, #128] ; (356c ) - 34ec: f813 0024 ldrb.w r0, [r3, r4, lsl #2] - 34f0: f000 f904 bl 36fc - 34f4: 2800 cmp r0, #0 - 34f6: d0f3 beq.n 34e0 + 3546: f89d 1008 ldrb.w r1, [sp, #8] + 354a: 4b20 ldr r3, [pc, #128] ; (35cc ) + 354c: f813 0024 ldrb.w r0, [r3, r4, lsl #2] + 3550: f000 f904 bl 375c + 3554: 2800 cmp r0, #0 + 3556: d0f3 beq.n 3540 boot_magic_compatible_check(table->bst_magic_scratch, - 34f8: 4b1c ldr r3, [pc, #112] ; (356c ) - 34fa: eb03 0384 add.w r3, r3, r4, lsl #2 - 34fe: f89d 1010 ldrb.w r1, [sp, #16] - 3502: 7858 ldrb r0, [r3, #1] - 3504: f000 f8fa bl 36fc + 3558: 4b1c ldr r3, [pc, #112] ; (35cc ) + 355a: eb03 0384 add.w r3, r3, r4, lsl #2 + 355e: f89d 1010 ldrb.w r1, [sp, #16] + 3562: 7858 ldrb r0, [r3, #1] + 3564: f000 f8fa bl 375c state_primary_slot.magic) && - 3508: 2800 cmp r0, #0 - 350a: d0e9 beq.n 34e0 + 3568: 2800 cmp r0, #0 + 356a: d0e9 beq.n 3540 (table->bst_copy_done_primary_slot == BOOT_FLAG_ANY || - 350c: 4b17 ldr r3, [pc, #92] ; (356c ) - 350e: eb03 0384 add.w r3, r3, r4, lsl #2 - 3512: 789b ldrb r3, [r3, #2] + 356c: 4b17 ldr r3, [pc, #92] ; (35cc ) + 356e: eb03 0384 add.w r3, r3, r4, lsl #2 + 3572: 789b ldrb r3, [r3, #2] state_scratch.magic) && - 3514: 2b04 cmp r3, #4 - 3516: d003 beq.n 3520 + 3574: 2b04 cmp r3, #4 + 3576: d003 beq.n 3580 table->bst_copy_done_primary_slot == state_primary_slot.copy_done)) - 3518: f89d 200a ldrb.w r2, [sp, #10] + 3578: f89d 200a ldrb.w r2, [sp, #10] (table->bst_copy_done_primary_slot == BOOT_FLAG_ANY || - 351c: 4293 cmp r3, r2 - 351e: d1df bne.n 34e0 + 357c: 4293 cmp r3, r2 + 357e: d1df bne.n 3540 source = table->bst_status_source; - 3520: 4b12 ldr r3, [pc, #72] ; (356c ) - 3522: eb03 0484 add.w r4, r3, r4, lsl #2 - 3526: 78e5 ldrb r5, [r4, #3] + 3580: 4b12 ldr r3, [pc, #72] ; (35cc ) + 3582: eb03 0484 add.w r4, r3, r4, lsl #2 + 3586: 78e5 ldrb r5, [r4, #3] BOOT_LOG_INF("Boot source: %s", - 3528: 2d00 cmp r5, #0 - 352a: d0d2 beq.n 34d2 - 352c: 2d01 cmp r5, #1 - 352e: d0d5 beq.n 34dc - 3530: 2d02 cmp r5, #2 - 3532: d0cc beq.n 34ce - 3534: 490e ldr r1, [pc, #56] ; (3570 ) - 3536: e7cd b.n 34d4 + 3588: 2d00 cmp r5, #0 + 358a: d0d2 beq.n 3532 + 358c: 2d01 cmp r5, #1 + 358e: d0d5 beq.n 353c + 3590: 2d02 cmp r5, #2 + 3592: d0cc beq.n 352e + 3594: 490e ldr r1, [pc, #56] ; (35d0 ) + 3596: e7cd b.n 3534 BOOT_LOG_INF("Boot source: none"); - 3538: 480e ldr r0, [pc, #56] ; (3574 ) - 353a: f000 fef3 bl 4324 -} - 353e: 4628 mov r0, r5 - 3540: b007 add sp, #28 - 3542: bd30 pop {r4, r5, pc} - 3544: 000055b4 .word 0x000055b4 - 3548: 000055fc .word 0x000055fc - 354c: 0000560c .word 0x0000560c - 3550: 00005650 .word 0x00005650 - 3554: 000055c0 .word 0x000055c0 - 3558: 000055b8 .word 0x000055b8 - 355c: 000055ec .word 0x000055ec - 3560: 000055d0 .word 0x000055d0 - 3564: 00005658 .word 0x00005658 - 3568: 000055c8 .word 0x000055c8 - 356c: 00005580 .word 0x00005580 - 3570: 000055d8 .word 0x000055d8 - 3574: 00005670 .word 0x00005670 - -00003578 : + 3598: 480e ldr r0, [pc, #56] ; (35d4 ) + 359a: f000 fef3 bl 4384 +} + 359e: 4628 mov r0, r5 + 35a0: b007 add sp, #28 + 35a2: bd30 pop {r4, r5, pc} + 35a4: 0000565c .word 0x0000565c + 35a8: 000056a4 .word 0x000056a4 + 35ac: 000056b4 .word 0x000056b4 + 35b0: 000056f8 .word 0x000056f8 + 35b4: 00005668 .word 0x00005668 + 35b8: 00005660 .word 0x00005660 + 35bc: 00005694 .word 0x00005694 + 35c0: 00005678 .word 0x00005678 + 35c4: 00005700 .word 0x00005700 + 35c8: 00005670 .word 0x00005670 + 35cc: 00005628 .word 0x00005628 + 35d0: 00005680 .word 0x00005680 + 35d4: 00005718 .word 0x00005718 + +000035d8 : void swap_run(struct boot_loader_state *state, struct boot_status *bs, uint32_t copy_size) { - 3578: b5f0 push {r4, r5, r6, r7, lr} - 357a: b083 sub sp, #12 - 357c: 4605 mov r5, r0 - 357e: 460e mov r6, r1 + 35d8: b5f0 push {r4, r5, r6, r7, lr} + 35da: b083 sub sp, #12 + 35dc: 4605 mov r5, r0 + 35de: 460e mov r6, r1 uint32_t swap_idx; int last_idx_secondary_slot; uint32_t primary_slot_size; uint32_t secondary_slot_size; primary_slot_size = 0; secondary_slot_size = 0; - 3580: 2000 movs r0, #0 + 35e0: 2000 movs r0, #0 primary_slot_size = 0; - 3582: 4603 mov r3, r0 + 35e2: 4603 mov r3, r0 last_sector_idx = 0; - 3584: 4601 mov r1, r0 - 3586: e000 b.n 358a + 35e4: 4601 mov r1, r0 + 35e6: e000 b.n 35ea if (primary_slot_size >= copy_size && secondary_slot_size >= copy_size && primary_slot_size == secondary_slot_size) { break; } last_sector_idx++; - 3588: 3101 adds r1, #1 + 35e8: 3101 adds r1, #1 if ((primary_slot_size < copy_size) || - 358a: 4293 cmp r3, r2 - 358c: d301 bcc.n 3592 - 358e: 4283 cmp r3, r0 - 3590: d207 bcs.n 35a2 - 3592: 6a6c ldr r4, [r5, #36] ; 0x24 - 3594: eb01 0c41 add.w ip, r1, r1, lsl #1 - 3598: ea4f 078c mov.w r7, ip, lsl #2 - 359c: 443c add r4, r7 - 359e: 68a4 ldr r4, [r4, #8] + 35ea: 4293 cmp r3, r2 + 35ec: d301 bcc.n 35f2 + 35ee: 4283 cmp r3, r0 + 35f0: d207 bcs.n 3602 + 35f2: 6a6c ldr r4, [r5, #36] ; 0x24 + 35f4: eb01 0c41 add.w ip, r1, r1, lsl #1 + 35f8: ea4f 078c mov.w r7, ip, lsl #2 + 35fc: 443c add r4, r7 + 35fe: 68a4 ldr r4, [r4, #8] primary_slot_size += boot_img_sector_size(state, - 35a0: 4423 add r3, r4 + 3600: 4423 add r3, r4 if ((secondary_slot_size < copy_size) || - 35a2: 4290 cmp r0, r2 - 35a4: d301 bcc.n 35aa - 35a6: 4283 cmp r3, r0 - 35a8: d907 bls.n 35ba - 35aa: 6d2c ldr r4, [r5, #80] ; 0x50 - 35ac: eb01 0c41 add.w ip, r1, r1, lsl #1 - 35b0: ea4f 078c mov.w r7, ip, lsl #2 - 35b4: 443c add r4, r7 - 35b6: 68a4 ldr r4, [r4, #8] + 3602: 4290 cmp r0, r2 + 3604: d301 bcc.n 360a + 3606: 4283 cmp r3, r0 + 3608: d907 bls.n 361a + 360a: 6d2c ldr r4, [r5, #80] ; 0x50 + 360c: eb01 0c41 add.w ip, r1, r1, lsl #1 + 3610: ea4f 078c mov.w r7, ip, lsl #2 + 3614: 443c add r4, r7 + 3616: 68a4 ldr r4, [r4, #8] secondary_slot_size += boot_img_sector_size(state, - 35b8: 4420 add r0, r4 + 3618: 4420 add r0, r4 if (primary_slot_size >= copy_size && - 35ba: 4293 cmp r3, r2 - 35bc: d3e4 bcc.n 3588 - 35be: 4290 cmp r0, r2 - 35c0: d3e2 bcc.n 3588 + 361a: 4293 cmp r3, r2 + 361c: d3e4 bcc.n 35e8 + 361e: 4290 cmp r0, r2 + 3620: d3e2 bcc.n 35e8 secondary_slot_size >= copy_size && - 35c2: 4283 cmp r3, r0 - 35c4: d1e0 bne.n 3588 + 3622: 4283 cmp r3, r0 + 3624: d1e0 bne.n 35e8 last_idx_secondary_slot++; } swap_idx = 0; - 35c6: 2400 movs r4, #0 - 35c8: e002 b.n 35d0 + 3626: 2400 movs r4, #0 + 3628: e002 b.n 3630 sz = boot_copy_sz(state, last_sector_idx, &first_sector_idx); if (swap_idx >= (bs->idx - BOOT_STATUS_IDX_0)) { boot_swap_sectors(first_sector_idx, sz, state, bs); } last_sector_idx = first_sector_idx - 1; - 35ca: 9901 ldr r1, [sp, #4] - 35cc: 3901 subs r1, #1 + 362a: 9901 ldr r1, [sp, #4] + 362c: 3901 subs r1, #1 swap_idx++; - 35ce: 3401 adds r4, #1 + 362e: 3401 adds r4, #1 while (last_sector_idx >= 0) { - 35d0: 2900 cmp r1, #0 - 35d2: db0e blt.n 35f2 + 3630: 2900 cmp r1, #0 + 3632: db0e blt.n 3652 sz = boot_copy_sz(state, last_sector_idx, &first_sector_idx); - 35d4: aa01 add r2, sp, #4 - 35d6: 4628 mov r0, r5 - 35d8: f7ff fc79 bl 2ece + 3634: aa01 add r2, sp, #4 + 3636: 4628 mov r0, r5 + 3638: f7ff fc79 bl 2f2e if (swap_idx >= (bs->idx - BOOT_STATUS_IDX_0)) { - 35dc: 6833 ldr r3, [r6, #0] - 35de: 3b01 subs r3, #1 - 35e0: 42a3 cmp r3, r4 - 35e2: d8f2 bhi.n 35ca + 363c: 6833 ldr r3, [r6, #0] + 363e: 3b01 subs r3, #1 + 3640: 42a3 cmp r3, r4 + 3642: d8f2 bhi.n 362a boot_swap_sectors(first_sector_idx, sz, state, bs); - 35e4: 4633 mov r3, r6 - 35e6: 462a mov r2, r5 - 35e8: 4601 mov r1, r0 - 35ea: 9801 ldr r0, [sp, #4] - 35ec: f7ff fc86 bl 2efc - 35f0: e7eb b.n 35ca + 3644: 4633 mov r3, r6 + 3646: 462a mov r2, r5 + 3648: 4601 mov r1, r0 + 364a: 9801 ldr r0, [sp, #4] + 364c: f7ff fc86 bl 2f5c + 3650: e7eb b.n 362a } } - 35f2: b003 add sp, #12 - 35f4: bdf0 pop {r4, r5, r6, r7, pc} + 3652: b003 add sp, #12 + 3654: bdf0 pop {r4, r5, r6, r7, pc} -000035f6 : +00003656 : } static int boot_flag_decode(uint8_t flag) { if (flag != BOOT_FLAG_SET) { - 35f6: 2801 cmp r0, #1 - 35f8: d101 bne.n 35fe + 3656: 2801 cmp r0, #1 + 3658: d101 bne.n 365e return BOOT_FLAG_BAD; } return BOOT_FLAG_SET; - 35fa: 2001 movs r0, #1 + 365a: 2001 movs r0, #1 } - 35fc: 4770 bx lr + 365c: 4770 bx lr return BOOT_FLAG_BAD; - 35fe: 2002 movs r0, #2 - 3600: 4770 bx lr + 365e: 2002 movs r0, #2 + 3660: 4770 bx lr ... -00003604 : +00003664 : { - 3604: b508 push {r3, lr} + 3664: b508 push {r3, lr} if (memcmp(magic, boot_img_magic, BOOT_MAGIC_SZ) == 0) { - 3606: 2210 movs r2, #16 - 3608: 4903 ldr r1, [pc, #12] ; (3618 ) - 360a: f7fe fbb2 bl 1d72 - 360e: b908 cbnz r0, 3614 + 3666: 2210 movs r2, #16 + 3668: 4903 ldr r1, [pc, #12] ; (3678 ) + 366a: f7fe fb82 bl 1d72 + 366e: b908 cbnz r0, 3674 return BOOT_MAGIC_GOOD; - 3610: 2001 movs r0, #1 + 3670: 2001 movs r0, #1 } - 3612: bd08 pop {r3, pc} + 3672: bd08 pop {r3, pc} return BOOT_MAGIC_BAD; - 3614: 2002 movs r0, #2 - 3616: e7fc b.n 3612 - 3618: 0000568c .word 0x0000568c + 3674: 2002 movs r0, #2 + 3676: e7fc b.n 3672 + 3678: 00005734 .word 0x00005734 -0000361c : +0000367c : * * @returns 0 on success, -1 on errors */ static int boot_find_status(int image_index, const struct flash_area **fap) { - 361c: b530 push {r4, r5, lr} - 361e: b087 sub sp, #28 - 3620: 460d mov r5, r1 + 367c: b530 push {r4, r5, lr} + 367e: b087 sub sp, #28 + 3680: 460d mov r5, r1 uint32_t magic[BOOT_MAGIC_ARR_SZ]; uint32_t off; uint8_t areas[2] = { - 3622: 4b14 ldr r3, [pc, #80] ; (3674 ) - 3624: 881b ldrh r3, [r3, #0] - 3626: f8ad 3004 strh.w r3, [sp, #4] + 3682: 4b14 ldr r3, [pc, #80] ; (36d4 ) + 3684: 881b ldrh r3, [r3, #0] + 3686: f8ad 3004 strh.w r3, [sp, #4] * Both "slots" can end up being temporary storage for a swap and it * is assumed that if magic is valid then other metadata is too, * because magic is always written in the last step. */ for (i = 0; i < sizeof(areas) / sizeof(areas[0]); i++) { - 362a: 2400 movs r4, #0 - 362c: e000 b.n 3630 - 362e: 3401 adds r4, #1 - 3630: 2c01 cmp r4, #1 - 3632: d81a bhi.n 366a + 368a: 2400 movs r4, #0 + 368c: e000 b.n 3690 + 368e: 3401 adds r4, #1 + 3690: 2c01 cmp r4, #1 + 3692: d81a bhi.n 36ca rc = flash_area_open(areas[i], fap); - 3634: 4629 mov r1, r5 - 3636: ab06 add r3, sp, #24 - 3638: 4423 add r3, r4 - 363a: f813 0c14 ldrb.w r0, [r3, #-20] - 363e: f001 f99f bl 4980 + 3694: 4629 mov r1, r5 + 3696: ab06 add r3, sp, #24 + 3698: 4423 add r3, r4 + 369a: f813 0c14 ldrb.w r0, [r3, #-20] + 369e: f001 f99f bl 49e0 if (rc != 0) { - 3642: 4603 mov r3, r0 - 3644: b998 cbnz r0, 366e + 36a2: 4603 mov r3, r0 + 36a4: b998 cbnz r0, 36ce return rc; } off = boot_magic_off(*fap); - 3646: 6828 ldr r0, [r5, #0] + 36a6: 6828 ldr r0, [r5, #0] return fap->fa_size - BOOT_MAGIC_SZ; - 3648: 6881 ldr r1, [r0, #8] + 36a8: 6881 ldr r1, [r0, #8] rc = flash_area_read(*fap, off, magic, BOOT_MAGIC_SZ); - 364a: 2310 movs r3, #16 - 364c: aa02 add r2, sp, #8 - 364e: 3910 subs r1, #16 - 3650: f001 f9f4 bl 4a3c + 36aa: 2310 movs r3, #16 + 36ac: aa02 add r2, sp, #8 + 36ae: 3910 subs r1, #16 + 36b0: f001 f9f4 bl 4a9c if (rc != 0) { - 3654: 4603 mov r3, r0 - 3656: b950 cbnz r0, 366e + 36b4: 4603 mov r3, r0 + 36b6: b950 cbnz r0, 36ce flash_area_close(*fap); return rc; } if (memcmp(magic, boot_img_magic, BOOT_MAGIC_SZ) == 0) { - 3658: 2210 movs r2, #16 - 365a: 4907 ldr r1, [pc, #28] ; (3678 ) - 365c: a802 add r0, sp, #8 - 365e: f7fe fb88 bl 1d72 - 3662: 4603 mov r3, r0 - 3664: 2800 cmp r0, #0 - 3666: d1e2 bne.n 362e - 3668: e001 b.n 366e + 36b8: 2210 movs r2, #16 + 36ba: 4907 ldr r1, [pc, #28] ; (36d8 ) + 36bc: a802 add r0, sp, #8 + 36be: f7fe fb58 bl 1d72 + 36c2: 4603 mov r3, r0 + 36c4: 2800 cmp r0, #0 + 36c6: d1e2 bne.n 368e + 36c8: e001 b.n 36ce flash_area_close(*fap); } /* If we got here, no magic was found */ return -1; - 366a: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 36ca: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff } - 366e: 4618 mov r0, r3 - 3670: b007 add sp, #28 - 3672: bd30 pop {r4, r5, pc} - 3674: 00005688 .word 0x00005688 - 3678: 0000568c .word 0x0000568c + 36ce: 4618 mov r0, r3 + 36d0: b007 add sp, #28 + 36d2: bd30 pop {r4, r5, pc} + 36d4: 00005730 .word 0x00005730 + 36d8: 00005734 .word 0x00005734 -0000367c : +000036dc : * @returns 0 on success, != 0 on error. */ static int boot_write_trailer(const struct flash_area *fap, uint32_t off, const uint8_t *inbuf, uint8_t inlen) { - 367c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} - 3680: b083 sub sp, #12 - 3682: 4606 mov r6, r0 - 3684: 460f mov r7, r1 - 3686: 4690 mov r8, r2 - 3688: 461c mov r4, r3 + 36dc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} + 36e0: b083 sub sp, #12 + 36e2: 4606 mov r6, r0 + 36e4: 460f mov r7, r1 + 36e6: 4690 mov r8, r2 + 36e8: 461c mov r4, r3 uint8_t buf[BOOT_MAX_ALIGN]; uint8_t align; uint8_t erased_val; int rc; align = flash_area_align(fap); - 368a: f001 fa10 bl 4aae + 36ea: f001 fa10 bl 4b0e if (inlen > BOOT_MAX_ALIGN || align > BOOT_MAX_ALIGN) { - 368e: 2c08 cmp r4, #8 - 3690: d823 bhi.n 36da - 3692: 4605 mov r5, r0 - 3694: 2808 cmp r0, #8 - 3696: d823 bhi.n 36e0 + 36ee: 2c08 cmp r4, #8 + 36f0: d823 bhi.n 373a + 36f2: 4605 mov r5, r0 + 36f4: 2808 cmp r0, #8 + 36f6: d823 bhi.n 3740 return -1; } erased_val = flash_area_erased_val(fap); - 3698: 4630 mov r0, r6 - 369a: f001 fa0d bl 4ab8 - 369e: 4681 mov r9, r0 + 36f8: 4630 mov r0, r6 + 36fa: f001 fa0d bl 4b18 + 36fe: 4681 mov r9, r0 if (align < inlen) { - 36a0: 42a5 cmp r5, r4 - 36a2: d200 bcs.n 36a6 + 3700: 42a5 cmp r5, r4 + 3702: d200 bcs.n 3706 align = inlen; - 36a4: 4625 mov r5, r4 + 3704: 4625 mov r5, r4 } memcpy(buf, inbuf, inlen); - 36a6: 4622 mov r2, r4 - 36a8: 4641 mov r1, r8 - 36aa: 4668 mov r0, sp - 36ac: f7fe fb85 bl 1dba + 3706: 4622 mov r2, r4 + 3708: 4641 mov r1, r8 + 370a: 4668 mov r0, sp + 370c: f7fe fb55 bl 1dba memset(&buf[inlen], erased_val, align - inlen); - 36b0: 1b2a subs r2, r5, r4 - 36b2: fa5f f189 uxtb.w r1, r9 - 36b6: eb0d 0004 add.w r0, sp, r4 - 36ba: f7fe fb8b bl 1dd4 + 3710: 1b2a subs r2, r5, r4 + 3712: fa5f f189 uxtb.w r1, r9 + 3716: eb0d 0004 add.w r0, sp, r4 + 371a: f7fe fb5b bl 1dd4 rc = flash_area_write(fap, off, buf, align); - 36be: 462b mov r3, r5 - 36c0: 466a mov r2, sp - 36c2: 4639 mov r1, r7 - 36c4: 4630 mov r0, r6 - 36c6: f001 f9cc bl 4a62 + 371e: 462b mov r3, r5 + 3720: 466a mov r2, sp + 3722: 4639 mov r1, r7 + 3724: 4630 mov r0, r6 + 3726: f001 f9cc bl 4ac2 if (rc != 0) { - 36ca: 4603 mov r3, r0 - 36cc: b918 cbnz r0, 36d6 + 372a: 4603 mov r3, r0 + 372c: b918 cbnz r0, 3736 return BOOT_EFLASH; } return 0; } - 36ce: 4618 mov r0, r3 - 36d0: b003 add sp, #12 - 36d2: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} + 372e: 4618 mov r0, r3 + 3730: b003 add sp, #12 + 3732: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} return BOOT_EFLASH; - 36d6: 2301 movs r3, #1 - 36d8: e7f9 b.n 36ce + 3736: 2301 movs r3, #1 + 3738: e7f9 b.n 372e return -1; - 36da: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 36de: e7f6 b.n 36ce - 36e0: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 36e4: e7f3 b.n 36ce + 373a: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 373e: e7f6 b.n 372e + 3740: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 3744: e7f3 b.n 372e -000036e6 : +00003746 : static int boot_write_trailer_flag(const struct flash_area *fap, uint32_t off, uint8_t flag_val) { - 36e6: b510 push {r4, lr} - 36e8: b082 sub sp, #8 + 3746: b510 push {r4, lr} + 3748: b082 sub sp, #8 const uint8_t buf[1] = { flag_val }; - 36ea: ac02 add r4, sp, #8 - 36ec: f804 2d04 strb.w r2, [r4, #-4]! + 374a: ac02 add r4, sp, #8 + 374c: f804 2d04 strb.w r2, [r4, #-4]! return boot_write_trailer(fap, off, buf, 1); - 36f0: 2301 movs r3, #1 - 36f2: 4622 mov r2, r4 - 36f4: f7ff ffc2 bl 367c + 3750: 2301 movs r3, #1 + 3752: 4622 mov r2, r4 + 3754: f7ff ffc2 bl 36dc } - 36f8: b002 add sp, #8 - 36fa: bd10 pop {r4, pc} + 3758: b002 add sp, #8 + 375a: bd10 pop {r4, pc} -000036fc : +0000375c : switch (tbl_val) { - 36fc: 2804 cmp r0, #4 - 36fe: d00b beq.n 3718 - 3700: 2805 cmp r0, #5 - 3702: d104 bne.n 370e + 375c: 2804 cmp r0, #4 + 375e: d00b beq.n 3778 + 3760: 2805 cmp r0, #5 + 3762: d104 bne.n 376e return val != BOOT_MAGIC_GOOD; - 3704: f111 30ff adds.w r0, r1, #4294967295 ; 0xffffffff - 3708: bf18 it ne - 370a: 2001 movne r0, #1 - 370c: 4770 bx lr + 3764: f111 30ff adds.w r0, r1, #4294967295 ; 0xffffffff + 3768: bf18 it ne + 376a: 2001 movne r0, #1 + 376c: 4770 bx lr return tbl_val == val; - 370e: 4288 cmp r0, r1 - 3710: bf14 ite ne - 3712: 2000 movne r0, #0 - 3714: 2001 moveq r0, #1 - 3716: 4770 bx lr + 376e: 4288 cmp r0, r1 + 3770: bf14 ite ne + 3772: 2000 movne r0, #0 + 3774: 2001 moveq r0, #1 + 3776: 4770 bx lr return 1; - 3718: 2001 movs r0, #1 + 3778: 2001 movs r0, #1 } - 371a: 4770 bx lr + 377a: 4770 bx lr -0000371c : +0000377c : BOOT_STATUS_MAX_ENTRIES * BOOT_STATUS_STATE_COUNT * min_write_sz; - 371c: eb00 0340 add.w r3, r0, r0, lsl #1 - 3720: 01d8 lsls r0, r3, #7 + 377c: eb00 0340 add.w r3, r0, r0, lsl #1 + 3780: 01d8 lsls r0, r3, #7 } - 3722: 4770 bx lr + 3782: 4770 bx lr -00003724 : +00003784 : { - 3724: b508 push {r3, lr} + 3784: b508 push {r3, lr} boot_status_sz(min_write_sz) + - 3726: f7ff fff9 bl 371c + 3786: f7ff fff9 bl 377c } - 372a: 3030 adds r0, #48 ; 0x30 - 372c: bd08 pop {r3, pc} + 378a: 3030 adds r0, #48 ; 0x30 + 378c: bd08 pop {r3, pc} -0000372e : +0000378e : if (fap->fa_id == FLASH_AREA_IMAGE_SCRATCH) { - 372e: 780b ldrb r3, [r1, #0] - 3730: 2b03 cmp r3, #3 - 3732: d006 beq.n 3742 + 378e: 780b ldrb r3, [r1, #0] + 3790: 2b03 cmp r3, #3 + 3792: d006 beq.n 37a2 if (fap->fa_id == FLASH_AREA_IMAGE_PRIMARY(image_index) || - 3734: 3b01 subs r3, #1 - 3736: b2db uxtb r3, r3 - 3738: 2b01 cmp r3, #1 - 373a: d804 bhi.n 3746 + 3794: 3b01 subs r3, #1 + 3796: b2db uxtb r3, r3 + 3798: 2b01 cmp r3, #1 + 379a: d804 bhi.n 37a6 return BOOT_STATUS_STATE_COUNT * BOOT_STATUS_MAX_ENTRIES; - 373c: f44f 70c0 mov.w r0, #384 ; 0x180 - 3740: 4770 bx lr + 379c: f44f 70c0 mov.w r0, #384 ; 0x180 + 37a0: 4770 bx lr return BOOT_STATUS_STATE_COUNT; - 3742: 2003 movs r0, #3 - 3744: 4770 bx lr + 37a2: 2003 movs r0, #3 + 37a4: 4770 bx lr return -1; - 3746: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 37a6: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff } - 374a: 4770 bx lr + 37aa: 4770 bx lr -0000374c : +000037ac : { - 374c: b510 push {r4, lr} - 374e: 4604 mov r4, r0 + 37ac: b510 push {r4, lr} + 37ae: 4604 mov r4, r0 elem_sz = flash_area_align(fap); - 3750: f001 f9ad bl 4aae + 37b0: f001 f9ad bl 4b0e off_from_end = boot_trailer_sz(elem_sz); - 3754: f7ff ffe6 bl 3724 + 37b4: f7ff ffe6 bl 3784 assert(off_from_end <= fap->fa_size); - 3758: 68a3 ldr r3, [r4, #8] - 375a: 4283 cmp r3, r0 - 375c: d301 bcc.n 3762 + 37b8: 68a3 ldr r3, [r4, #8] + 37ba: 4283 cmp r3, r0 + 37bc: d301 bcc.n 37c2 } - 375e: 1a18 subs r0, r3, r0 - 3760: bd10 pop {r4, pc} + 37be: 1a18 subs r0, r3, r0 + 37c0: bd10 pop {r4, pc} assert(off_from_end <= fap->fa_size); - 3762: 2300 movs r3, #0 - 3764: 461a mov r2, r3 - 3766: 4619 mov r1, r3 - 3768: 4618 mov r0, r3 - 376a: f7fd ffcf bl 170c <__assert_func> + 37c2: 2300 movs r3, #0 + 37c4: 461a mov r2, r3 + 37c6: 4619 mov r1, r3 + 37c8: 4618 mov r0, r3 + 37ca: f7fd ff9f bl 170c <__assert_func> -0000376e : +000037ce : return fap->fa_size - BOOT_MAGIC_SZ; - 376e: 6880 ldr r0, [r0, #8] + 37ce: 6880 ldr r0, [r0, #8] } - 3770: 3828 subs r0, #40 ; 0x28 - 3772: 4770 bx lr + 37d0: 3828 subs r0, #40 ; 0x28 + 37d2: 4770 bx lr -00003774 : +000037d4 : { - 3774: b530 push {r4, r5, lr} - 3776: b087 sub sp, #28 - 3778: 4604 mov r4, r0 - 377a: 460d mov r5, r1 + 37d4: b530 push {r4, r5, lr} + 37d6: b087 sub sp, #28 + 37d8: 4604 mov r4, r0 + 37da: 460d mov r5, r1 return fap->fa_size - BOOT_MAGIC_SZ; - 377c: 6881 ldr r1, [r0, #8] + 37dc: 6881 ldr r1, [r0, #8] rc = flash_area_read_is_empty(fap, off, magic, BOOT_MAGIC_SZ); - 377e: 2310 movs r3, #16 - 3780: aa02 add r2, sp, #8 - 3782: 3910 subs r1, #16 - 3784: f001 f99d bl 4ac2 + 37de: 2310 movs r3, #16 + 37e0: aa02 add r2, sp, #8 + 37e2: 3910 subs r1, #16 + 37e4: f001 f99d bl 4b22 if (rc < 0) { - 3788: 2800 cmp r0, #0 - 378a: db4a blt.n 3822 + 37e8: 2800 cmp r0, #0 + 37ea: db4a blt.n 3882 if (rc == 1) { - 378c: 2801 cmp r0, #1 - 378e: d03e beq.n 380e + 37ec: 2801 cmp r0, #1 + 37ee: d03e beq.n 386e state->magic = boot_magic_decode(magic); - 3790: a802 add r0, sp, #8 - 3792: f7ff ff37 bl 3604 - 3796: 7028 strb r0, [r5, #0] + 37f0: a802 add r0, sp, #8 + 37f2: f7ff ff37 bl 3664 + 37f6: 7028 strb r0, [r5, #0] off = boot_swap_info_off(fap); - 3798: 4620 mov r0, r4 - 379a: f7ff ffe8 bl 376e + 37f8: 4620 mov r0, r4 + 37fa: f7ff ffe8 bl 37ce rc = flash_area_read_is_empty(fap, off, &swap_info, sizeof swap_info); - 379e: 2301 movs r3, #1 - 37a0: f10d 0207 add.w r2, sp, #7 - 37a4: 4601 mov r1, r0 - 37a6: 4620 mov r0, r4 - 37a8: f001 f98b bl 4ac2 + 37fe: 2301 movs r3, #1 + 3800: f10d 0207 add.w r2, sp, #7 + 3804: 4601 mov r1, r0 + 3806: 4620 mov r0, r4 + 3808: f001 f98b bl 4b22 if (rc < 0) { - 37ac: 2800 cmp r0, #0 - 37ae: db3b blt.n 3828 + 380c: 2800 cmp r0, #0 + 380e: db3b blt.n 3888 state->swap_type = BOOT_GET_SWAP_TYPE(swap_info); - 37b0: f89d 3007 ldrb.w r3, [sp, #7] - 37b4: f003 020f and.w r2, r3, #15 - 37b8: 706a strb r2, [r5, #1] + 3810: f89d 3007 ldrb.w r3, [sp, #7] + 3814: f003 020f and.w r2, r3, #15 + 3818: 706a strb r2, [r5, #1] state->image_num = BOOT_GET_IMAGE_NUM(swap_info); - 37ba: 091b lsrs r3, r3, #4 - 37bc: 712b strb r3, [r5, #4] + 381a: 091b lsrs r3, r3, #4 + 381c: 712b strb r3, [r5, #4] if (rc == 1 || state->swap_type > BOOT_SWAP_TYPE_REVERT) { - 37be: 2801 cmp r0, #1 - 37c0: d001 beq.n 37c6 - 37c2: 2a04 cmp r2, #4 - 37c4: d903 bls.n 37ce + 381e: 2801 cmp r0, #1 + 3820: d001 beq.n 3826 + 3822: 2a04 cmp r2, #4 + 3824: d903 bls.n 382e state->swap_type = BOOT_SWAP_TYPE_NONE; - 37c6: 2301 movs r3, #1 - 37c8: 706b strb r3, [r5, #1] + 3826: 2301 movs r3, #1 + 3828: 706b strb r3, [r5, #1] state->image_num = 0; - 37ca: 2300 movs r3, #0 - 37cc: 712b strb r3, [r5, #4] + 382a: 2300 movs r3, #0 + 382c: 712b strb r3, [r5, #4] return fap->fa_size - BOOT_MAGIC_SZ; - 37ce: 68a1 ldr r1, [r4, #8] + 382e: 68a1 ldr r1, [r4, #8] rc = flash_area_read_is_empty(fap, off, &state->copy_done, - 37d0: 2301 movs r3, #1 - 37d2: 1caa adds r2, r5, #2 - 37d4: 3920 subs r1, #32 - 37d6: 4620 mov r0, r4 - 37d8: f001 f973 bl 4ac2 + 3830: 2301 movs r3, #1 + 3832: 1caa adds r2, r5, #2 + 3834: 3920 subs r1, #32 + 3836: 4620 mov r0, r4 + 3838: f001 f973 bl 4b22 if (rc < 0) { - 37dc: 2800 cmp r0, #0 - 37de: db25 blt.n 382c + 383c: 2800 cmp r0, #0 + 383e: db25 blt.n 388c if (rc == 1) { - 37e0: 2801 cmp r0, #1 - 37e2: d017 beq.n 3814 + 3840: 2801 cmp r0, #1 + 3842: d017 beq.n 3874 state->copy_done = boot_flag_decode(state->copy_done); - 37e4: 78a8 ldrb r0, [r5, #2] - 37e6: f7ff ff06 bl 35f6 - 37ea: 70a8 strb r0, [r5, #2] + 3844: 78a8 ldrb r0, [r5, #2] + 3846: f7ff ff06 bl 3656 + 384a: 70a8 strb r0, [r5, #2] return fap->fa_size - BOOT_MAGIC_SZ; - 37ec: 68a1 ldr r1, [r4, #8] + 384c: 68a1 ldr r1, [r4, #8] rc = flash_area_read_is_empty(fap, off, &state->image_ok, - 37ee: 2301 movs r3, #1 - 37f0: 1cea adds r2, r5, #3 - 37f2: 3918 subs r1, #24 - 37f4: 4620 mov r0, r4 - 37f6: f001 f964 bl 4ac2 + 384e: 2301 movs r3, #1 + 3850: 1cea adds r2, r5, #3 + 3852: 3918 subs r1, #24 + 3854: 4620 mov r0, r4 + 3856: f001 f964 bl 4b22 if (rc < 0) { - 37fa: 2800 cmp r0, #0 - 37fc: db18 blt.n 3830 + 385a: 2800 cmp r0, #0 + 385c: db18 blt.n 3890 if (rc == 1) { - 37fe: 2801 cmp r0, #1 - 3800: d00b beq.n 381a + 385e: 2801 cmp r0, #1 + 3860: d00b beq.n 387a state->image_ok = boot_flag_decode(state->image_ok); - 3802: 78e8 ldrb r0, [r5, #3] - 3804: f7ff fef7 bl 35f6 - 3808: 70e8 strb r0, [r5, #3] + 3862: 78e8 ldrb r0, [r5, #3] + 3864: f7ff fef7 bl 3656 + 3868: 70e8 strb r0, [r5, #3] return 0; - 380a: 2000 movs r0, #0 - 380c: e00a b.n 3824 + 386a: 2000 movs r0, #0 + 386c: e00a b.n 3884 state->magic = BOOT_MAGIC_UNSET; - 380e: 2303 movs r3, #3 - 3810: 702b strb r3, [r5, #0] - 3812: e7c1 b.n 3798 + 386e: 2303 movs r3, #3 + 3870: 702b strb r3, [r5, #0] + 3872: e7c1 b.n 37f8 state->copy_done = BOOT_FLAG_UNSET; - 3814: 2303 movs r3, #3 - 3816: 70ab strb r3, [r5, #2] - 3818: e7e8 b.n 37ec + 3874: 2303 movs r3, #3 + 3876: 70ab strb r3, [r5, #2] + 3878: e7e8 b.n 384c state->image_ok = BOOT_FLAG_UNSET; - 381a: 2303 movs r3, #3 - 381c: 70eb strb r3, [r5, #3] + 387a: 2303 movs r3, #3 + 387c: 70eb strb r3, [r5, #3] return 0; - 381e: 2000 movs r0, #0 - 3820: e000 b.n 3824 + 387e: 2000 movs r0, #0 + 3880: e000 b.n 3884 return BOOT_EFLASH; - 3822: 2001 movs r0, #1 + 3882: 2001 movs r0, #1 } - 3824: b007 add sp, #28 - 3826: bd30 pop {r4, r5, pc} + 3884: b007 add sp, #28 + 3886: bd30 pop {r4, r5, pc} return BOOT_EFLASH; - 3828: 2001 movs r0, #1 - 382a: e7fb b.n 3824 + 3888: 2001 movs r0, #1 + 388a: e7fb b.n 3884 return BOOT_EFLASH; - 382c: 2001 movs r0, #1 - 382e: e7f9 b.n 3824 + 388c: 2001 movs r0, #1 + 388e: e7f9 b.n 3884 return BOOT_EFLASH; - 3830: 2001 movs r0, #1 - 3832: e7f7 b.n 3824 + 3890: 2001 movs r0, #1 + 3892: e7f7 b.n 3884 -00003834 : +00003894 : { - 3834: b510 push {r4, lr} - 3836: b082 sub sp, #8 - 3838: 460c mov r4, r1 + 3894: b510 push {r4, lr} + 3896: b082 sub sp, #8 + 3898: 460c mov r4, r1 rc = flash_area_open(flash_area_id, &fap); - 383a: a901 add r1, sp, #4 - 383c: b2c0 uxtb r0, r0 - 383e: f001 f89f bl 4980 + 389a: a901 add r1, sp, #4 + 389c: b2c0 uxtb r0, r0 + 389e: f001 f89f bl 49e0 if (rc != 0) { - 3842: b110 cbz r0, 384a + 38a2: b110 cbz r0, 38aa return BOOT_EFLASH; - 3844: 2001 movs r0, #1 + 38a4: 2001 movs r0, #1 } - 3846: b002 add sp, #8 - 3848: bd10 pop {r4, pc} + 38a6: b002 add sp, #8 + 38a8: bd10 pop {r4, pc} rc = boot_read_swap_state(fap, state); - 384a: 4621 mov r1, r4 - 384c: 9801 ldr r0, [sp, #4] - 384e: f7ff ff91 bl 3774 + 38aa: 4621 mov r1, r4 + 38ac: 9801 ldr r0, [sp, #4] + 38ae: f7ff ff91 bl 37d4 return rc; - 3852: e7f8 b.n 3846 + 38b2: e7f8 b.n 38a6 -00003854 : +000038b4 : { - 3854: b530 push {r4, r5, lr} - 3856: b083 sub sp, #12 - 3858: 460c mov r4, r1 + 38b4: b530 push {r4, r5, lr} + 38b6: b083 sub sp, #12 + 38b8: 460c mov r4, r1 rc = boot_find_status(image_index, &fap); - 385a: a901 add r1, sp, #4 - 385c: f7ff fede bl 361c + 38ba: a901 add r1, sp, #4 + 38bc: f7ff fede bl 367c if (rc == 0) { - 3860: 4603 mov r3, r0 - 3862: b110 cbz r0, 386a + 38c0: 4603 mov r3, r0 + 38c2: b110 cbz r0, 38ca } - 3864: 4618 mov r0, r3 - 3866: b003 add sp, #12 - 3868: bd30 pop {r4, r5, pc} + 38c4: 4618 mov r0, r3 + 38c6: b003 add sp, #12 + 38c8: bd30 pop {r4, r5, pc} off = boot_swap_size_off(fap); - 386a: 9d01 ldr r5, [sp, #4] + 38ca: 9d01 ldr r5, [sp, #4] return boot_swap_info_off(fap) - BOOT_MAX_ALIGN; - 386c: 4628 mov r0, r5 - 386e: f7ff ff7e bl 376e + 38cc: 4628 mov r0, r5 + 38ce: f7ff ff7e bl 37ce rc = flash_area_read(fap, off, swap_size, sizeof *swap_size); - 3872: 2304 movs r3, #4 - 3874: 4622 mov r2, r4 - 3876: f1a0 0108 sub.w r1, r0, #8 - 387a: 4628 mov r0, r5 - 387c: f001 f8de bl 4a3c - 3880: 4603 mov r3, r0 + 38d2: 2304 movs r3, #4 + 38d4: 4622 mov r2, r4 + 38d6: f1a0 0108 sub.w r1, r0, #8 + 38da: 4628 mov r0, r5 + 38dc: f001 f8de bl 4a9c + 38e0: 4603 mov r3, r0 return rc; - 3882: e7ef b.n 3864 + 38e2: e7ef b.n 38c4 -00003884 : +000038e4 : { - 3884: b508 push {r3, lr} + 38e4: b508 push {r3, lr} return fap->fa_size - BOOT_MAGIC_SZ; - 3886: 6881 ldr r1, [r0, #8] + 38e6: 6881 ldr r1, [r0, #8] rc = flash_area_write(fap, off, boot_img_magic, BOOT_MAGIC_SZ); - 3888: 2310 movs r3, #16 - 388a: 4a05 ldr r2, [pc, #20] ; (38a0 ) - 388c: 3910 subs r1, #16 - 388e: f001 f8e8 bl 4a62 + 38e8: 2310 movs r3, #16 + 38ea: 4a05 ldr r2, [pc, #20] ; (3900 ) + 38ec: 3910 subs r1, #16 + 38ee: f001 f8e8 bl 4ac2 if (rc != 0) { - 3892: 4603 mov r3, r0 - 3894: b908 cbnz r0, 389a + 38f2: 4603 mov r3, r0 + 38f4: b908 cbnz r0, 38fa } - 3896: 4618 mov r0, r3 - 3898: bd08 pop {r3, pc} + 38f6: 4618 mov r0, r3 + 38f8: bd08 pop {r3, pc} return BOOT_EFLASH; - 389a: 2301 movs r3, #1 - 389c: e7fb b.n 3896 - 389e: bf00 nop - 38a0: 0000568c .word 0x0000568c + 38fa: 2301 movs r3, #1 + 38fc: e7fb b.n 38f6 + 38fe: bf00 nop + 3900: 00005734 .word 0x00005734 -000038a4 : +00003904 : int boot_write_copy_done(const struct flash_area *fap) { - 38a4: b508 push {r3, lr} + 3904: b508 push {r3, lr} return fap->fa_size - BOOT_MAGIC_SZ; - 38a6: 6881 ldr r1, [r0, #8] + 3906: 6881 ldr r1, [r0, #8] off = boot_copy_done_off(fap); BOOT_LOG_DBG("writing copy_done; fa_id=%d off=0x%lx (0x%lx)", fap->fa_id, (unsigned long)off, (unsigned long)(fap->fa_off + off)); return boot_write_trailer_flag(fap, off, BOOT_FLAG_SET); - 38a8: 2201 movs r2, #1 - 38aa: 3920 subs r1, #32 - 38ac: f7ff ff1b bl 36e6 + 3908: 2201 movs r2, #1 + 390a: 3920 subs r1, #32 + 390c: f7ff ff1b bl 3746 } - 38b0: bd08 pop {r3, pc} + 3910: bd08 pop {r3, pc} -000038b2 : +00003912 : int boot_write_image_ok(const struct flash_area *fap) { - 38b2: b508 push {r3, lr} + 3912: b508 push {r3, lr} return fap->fa_size - BOOT_MAGIC_SZ; - 38b4: 6881 ldr r1, [r0, #8] + 3914: 6881 ldr r1, [r0, #8] off = boot_image_ok_off(fap); BOOT_LOG_DBG("writing image_ok; fa_id=%d off=0x%lx (0x%lx)", fap->fa_id, (unsigned long)off, (unsigned long)(fap->fa_off + off)); return boot_write_trailer_flag(fap, off, BOOT_FLAG_SET); - 38b6: 2201 movs r2, #1 - 38b8: 3918 subs r1, #24 - 38ba: f7ff ff14 bl 36e6 + 3916: 2201 movs r2, #1 + 3918: 3918 subs r1, #24 + 391a: f7ff ff14 bl 3746 } - 38be: bd08 pop {r3, pc} + 391e: bd08 pop {r3, pc} -000038c0 : +00003920 : * resume in case of an unexpected reset. */ int boot_write_swap_info(const struct flash_area *fap, uint8_t swap_type, uint8_t image_num) { - 38c0: b530 push {r4, r5, lr} - 38c2: b083 sub sp, #12 + 3920: b530 push {r4, r5, lr} + 3922: b083 sub sp, #12 uint32_t off; uint8_t swap_info; BOOT_SET_SWAP_INFO(swap_info, image_num, swap_type); - 38c4: 2a0e cmp r2, #14 - 38c6: d811 bhi.n 38ec - 38c8: 4605 mov r5, r0 - 38ca: 290e cmp r1, #14 - 38cc: d814 bhi.n 38f8 - 38ce: ea41 1102 orr.w r1, r1, r2, lsl #4 - 38d2: ac02 add r4, sp, #8 - 38d4: f804 1d01 strb.w r1, [r4, #-1]! + 3924: 2a0e cmp r2, #14 + 3926: d811 bhi.n 394c + 3928: 4605 mov r5, r0 + 392a: 290e cmp r1, #14 + 392c: d814 bhi.n 3958 + 392e: ea41 1102 orr.w r1, r1, r2, lsl #4 + 3932: ac02 add r4, sp, #8 + 3934: f804 1d01 strb.w r1, [r4, #-1]! off = boot_swap_info_off(fap); - 38d8: f7ff ff49 bl 376e + 3938: f7ff ff49 bl 37ce BOOT_LOG_DBG("writing swap_info; fa_id=%d off=0x%lx (0x%lx), swap_type=0x%x" " image_num=0x%x", fap->fa_id, (unsigned long)off, (unsigned long)(fap->fa_off + off), swap_type, image_num); return boot_write_trailer(fap, off, (const uint8_t *) &swap_info, 1); - 38dc: 2301 movs r3, #1 - 38de: 4622 mov r2, r4 - 38e0: 4601 mov r1, r0 - 38e2: 4628 mov r0, r5 - 38e4: f7ff feca bl 367c -} - 38e8: b003 add sp, #12 - 38ea: bd30 pop {r4, r5, pc} + 393c: 2301 movs r3, #1 + 393e: 4622 mov r2, r4 + 3940: 4601 mov r1, r0 + 3942: 4628 mov r0, r5 + 3944: f7ff feca bl 36dc +} + 3948: b003 add sp, #12 + 394a: bd30 pop {r4, r5, pc} BOOT_SET_SWAP_INFO(swap_info, image_num, swap_type); - 38ec: 2300 movs r3, #0 - 38ee: 461a mov r2, r3 - 38f0: 4619 mov r1, r3 - 38f2: 4618 mov r0, r3 - 38f4: f7fd ff0a bl 170c <__assert_func> - 38f8: 2300 movs r3, #0 - 38fa: 461a mov r2, r3 - 38fc: 4619 mov r1, r3 - 38fe: 4618 mov r0, r3 - 3900: f7fd ff04 bl 170c <__assert_func> - -00003904 : + 394c: 2300 movs r3, #0 + 394e: 461a mov r2, r3 + 3950: 4619 mov r1, r3 + 3952: 4618 mov r0, r3 + 3954: f7fd feda bl 170c <__assert_func> + 3958: 2300 movs r3, #0 + 395a: 461a mov r2, r3 + 395c: 4619 mov r1, r3 + 395e: 4618 mov r0, r3 + 3960: f7fd fed4 bl 170c <__assert_func> + +00003964 : int boot_write_swap_size(const struct flash_area *fap, uint32_t swap_size) { - 3904: b530 push {r4, r5, lr} - 3906: b083 sub sp, #12 - 3908: 4605 mov r5, r0 - 390a: ac02 add r4, sp, #8 - 390c: f844 1d04 str.w r1, [r4, #-4]! + 3964: b530 push {r4, r5, lr} + 3966: b083 sub sp, #12 + 3968: 4605 mov r5, r0 + 396a: ac02 add r4, sp, #8 + 396c: f844 1d04 str.w r1, [r4, #-4]! return boot_swap_info_off(fap) - BOOT_MAX_ALIGN; - 3910: f7ff ff2d bl 376e + 3970: f7ff ff2d bl 37ce off = boot_swap_size_off(fap); BOOT_LOG_DBG("writing swap_size; fa_id=%d off=0x%lx (0x%lx)", fap->fa_id, (unsigned long)off, (unsigned long)fap->fa_off + off); return boot_write_trailer(fap, off, (const uint8_t *) &swap_size, 4); - 3914: 2304 movs r3, #4 - 3916: 4622 mov r2, r4 - 3918: f1a0 0108 sub.w r1, r0, #8 - 391c: 4628 mov r0, r5 - 391e: f7ff fead bl 367c -} - 3922: b003 add sp, #12 - 3924: bd30 pop {r4, r5, pc} + 3974: 2304 movs r3, #4 + 3976: 4622 mov r2, r4 + 3978: f1a0 0108 sub.w r1, r0, #8 + 397c: 4628 mov r0, r5 + 397e: f7ff fead bl 36dc +} + 3982: b003 add sp, #12 + 3984: bd30 pop {r4, r5, pc} ... -00003928 : +00003988 : } #endif int boot_swap_type_multi(int image_index) { - 3928: b530 push {r4, r5, lr} - 392a: b085 sub sp, #20 + 3988: b530 push {r4, r5, lr} + 398a: b085 sub sp, #20 struct boot_swap_state primary_slot; struct boot_swap_state secondary_slot; int rc; size_t i; rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_PRIMARY(image_index), - 392c: a902 add r1, sp, #8 - 392e: 2001 movs r0, #1 - 3930: f7ff ff80 bl 3834 + 398c: a902 add r1, sp, #8 + 398e: 2001 movs r0, #1 + 3990: f7ff ff80 bl 3894 &primary_slot); if (rc) { - 3934: 2800 cmp r0, #0 - 3936: d150 bne.n 39da + 3994: 2800 cmp r0, #0 + 3996: d150 bne.n 3a3a return BOOT_SWAP_TYPE_PANIC; } rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SECONDARY(image_index), - 3938: 4669 mov r1, sp - 393a: 2002 movs r0, #2 - 393c: f7ff ff7a bl 3834 + 3998: 4669 mov r1, sp + 399a: 2002 movs r0, #2 + 399c: f7ff ff7a bl 3894 &secondary_slot); if (rc) { - 3940: 2800 cmp r0, #0 - 3942: d14d bne.n 39e0 + 39a0: 2800 cmp r0, #0 + 39a2: d14d bne.n 3a40 return BOOT_SWAP_TYPE_PANIC; } for (i = 0; i < BOOT_SWAP_TABLES_COUNT; i++) { - 3944: 2400 movs r4, #0 - 3946: e007 b.n 3958 + 39a4: 2400 movs r4, #0 + 39a6: e007 b.n 39b8 secondary_slot.magic) && (table->image_ok_primary_slot == BOOT_FLAG_ANY || table->image_ok_primary_slot == primary_slot.image_ok) && (table->image_ok_secondary_slot == BOOT_FLAG_ANY || table->image_ok_secondary_slot == secondary_slot.image_ok) && (table->copy_done_primary_slot == BOOT_FLAG_ANY || - 3948: 792b ldrb r3, [r5, #4] + 39a8: 792b ldrb r3, [r5, #4] table->image_ok_secondary_slot == secondary_slot.image_ok) && - 394a: 2b04 cmp r3, #4 - 394c: d028 beq.n 39a0 + 39aa: 2b04 cmp r3, #4 + 39ac: d028 beq.n 3a00 table->copy_done_primary_slot == primary_slot.copy_done)) { - 394e: f89d 200a ldrb.w r2, [sp, #10] + 39ae: f89d 200a ldrb.w r2, [sp, #10] (table->copy_done_primary_slot == BOOT_FLAG_ANY || - 3952: 4293 cmp r3, r2 - 3954: d024 beq.n 39a0 + 39b2: 4293 cmp r3, r2 + 39b4: d024 beq.n 3a00 for (i = 0; i < BOOT_SWAP_TABLES_COUNT; i++) { - 3956: 3401 adds r4, #1 - 3958: 2c02 cmp r4, #2 - 395a: d839 bhi.n 39d0 + 39b6: 3401 adds r4, #1 + 39b8: 2c02 cmp r4, #2 + 39ba: d839 bhi.n 3a30 table = boot_swap_tables + i; - 395c: eb04 0244 add.w r2, r4, r4, lsl #1 - 3960: 0053 lsls r3, r2, #1 - 3962: 4a20 ldr r2, [pc, #128] ; (39e4 ) - 3964: 18d5 adds r5, r2, r3 + 39bc: eb04 0244 add.w r2, r4, r4, lsl #1 + 39c0: 0053 lsls r3, r2, #1 + 39c2: 4a20 ldr r2, [pc, #128] ; (3a44 ) + 39c4: 18d5 adds r5, r2, r3 if (boot_magic_compatible_check(table->magic_primary_slot, - 3966: f89d 1008 ldrb.w r1, [sp, #8] - 396a: 5cd0 ldrb r0, [r2, r3] - 396c: f7ff fec6 bl 36fc - 3970: 2800 cmp r0, #0 - 3972: d0f0 beq.n 3956 + 39c6: f89d 1008 ldrb.w r1, [sp, #8] + 39ca: 5cd0 ldrb r0, [r2, r3] + 39cc: f7ff fec6 bl 375c + 39d0: 2800 cmp r0, #0 + 39d2: d0f0 beq.n 39b6 boot_magic_compatible_check(table->magic_secondary_slot, - 3974: f89d 1000 ldrb.w r1, [sp] - 3978: 7868 ldrb r0, [r5, #1] - 397a: f7ff febf bl 36fc + 39d4: f89d 1000 ldrb.w r1, [sp] + 39d8: 7868 ldrb r0, [r5, #1] + 39da: f7ff febf bl 375c primary_slot.magic) && - 397e: 2800 cmp r0, #0 - 3980: d0e9 beq.n 3956 + 39de: 2800 cmp r0, #0 + 39e0: d0e9 beq.n 39b6 (table->image_ok_primary_slot == BOOT_FLAG_ANY || - 3982: 78ab ldrb r3, [r5, #2] + 39e2: 78ab ldrb r3, [r5, #2] secondary_slot.magic) && - 3984: 2b04 cmp r3, #4 - 3986: d003 beq.n 3990 + 39e4: 2b04 cmp r3, #4 + 39e6: d003 beq.n 39f0 table->image_ok_primary_slot == primary_slot.image_ok) && - 3988: f89d 200b ldrb.w r2, [sp, #11] + 39e8: f89d 200b ldrb.w r2, [sp, #11] (table->image_ok_primary_slot == BOOT_FLAG_ANY || - 398c: 4293 cmp r3, r2 - 398e: d1e2 bne.n 3956 + 39ec: 4293 cmp r3, r2 + 39ee: d1e2 bne.n 39b6 (table->image_ok_secondary_slot == BOOT_FLAG_ANY || - 3990: 78eb ldrb r3, [r5, #3] + 39f0: 78eb ldrb r3, [r5, #3] table->image_ok_primary_slot == primary_slot.image_ok) && - 3992: 2b04 cmp r3, #4 - 3994: d0d8 beq.n 3948 + 39f2: 2b04 cmp r3, #4 + 39f4: d0d8 beq.n 39a8 table->image_ok_secondary_slot == secondary_slot.image_ok) && - 3996: f89d 2003 ldrb.w r2, [sp, #3] + 39f6: f89d 2003 ldrb.w r2, [sp, #3] (table->image_ok_secondary_slot == BOOT_FLAG_ANY || - 399a: 4293 cmp r3, r2 - 399c: d1db bne.n 3956 - 399e: e7d3 b.n 3948 + 39fa: 4293 cmp r3, r2 + 39fc: d1db bne.n 39b6 + 39fe: e7d3 b.n 39a8 BOOT_LOG_INF("Swap type: %s", - 39a0: 796b ldrb r3, [r5, #5] - 39a2: 2b02 cmp r3, #2 - 39a4: d007 beq.n 39b6 - 39a6: 2b03 cmp r3, #3 - 39a8: d010 beq.n 39cc - 39aa: 2b04 cmp r3, #4 - 39ac: d001 beq.n 39b2 - 39ae: 490e ldr r1, [pc, #56] ; (39e8 ) - 39b0: e002 b.n 39b8 - 39b2: 490e ldr r1, [pc, #56] ; (39ec ) - 39b4: e000 b.n 39b8 - 39b6: 490e ldr r1, [pc, #56] ; (39f0 ) - 39b8: 480e ldr r0, [pc, #56] ; (39f4 ) - 39ba: f000 ff89 bl 48d0 + 3a00: 796b ldrb r3, [r5, #5] + 3a02: 2b02 cmp r3, #2 + 3a04: d007 beq.n 3a16 + 3a06: 2b03 cmp r3, #3 + 3a08: d010 beq.n 3a2c + 3a0a: 2b04 cmp r3, #4 + 3a0c: d001 beq.n 3a12 + 3a0e: 490e ldr r1, [pc, #56] ; (3a48 ) + 3a10: e002 b.n 3a18 + 3a12: 490e ldr r1, [pc, #56] ; (3a4c ) + 3a14: e000 b.n 3a18 + 3a16: 490e ldr r1, [pc, #56] ; (3a50 ) + 3a18: 480e ldr r0, [pc, #56] ; (3a54 ) + 3a1a: f000 ff89 bl 4930 table->swap_type == BOOT_SWAP_TYPE_TEST ? "test" : table->swap_type == BOOT_SWAP_TYPE_PERM ? "perm" : table->swap_type == BOOT_SWAP_TYPE_REVERT ? "revert" : "BUG; can't happen"); if (table->swap_type != BOOT_SWAP_TYPE_TEST && - 39be: 7968 ldrb r0, [r5, #5] + 3a1e: 7968 ldrb r0, [r5, #5] table->swap_type != BOOT_SWAP_TYPE_PERM && - 39c0: 1e83 subs r3, r0, #2 - 39c2: b2db uxtb r3, r3 + 3a20: 1e83 subs r3, r0, #2 + 3a22: b2db uxtb r3, r3 if (table->swap_type != BOOT_SWAP_TYPE_TEST && - 39c4: 2b02 cmp r3, #2 - 39c6: d909 bls.n 39dc + 3a24: 2b02 cmp r3, #2 + 3a26: d909 bls.n 3a3c table->swap_type != BOOT_SWAP_TYPE_REVERT) { return BOOT_SWAP_TYPE_PANIC; - 39c8: 20ff movs r0, #255 ; 0xff - 39ca: e007 b.n 39dc + 3a28: 20ff movs r0, #255 ; 0xff + 3a2a: e007 b.n 3a3c BOOT_LOG_INF("Swap type: %s", - 39cc: 490a ldr r1, [pc, #40] ; (39f8 ) - 39ce: e7f3 b.n 39b8 + 3a2c: 490a ldr r1, [pc, #40] ; (3a58 ) + 3a2e: e7f3 b.n 3a18 } return table->swap_type; } } BOOT_LOG_INF("Swap type: none"); - 39d0: 480a ldr r0, [pc, #40] ; (39fc ) - 39d2: f000 fca7 bl 4324 + 3a30: 480a ldr r0, [pc, #40] ; (3a5c ) + 3a32: f000 fca7 bl 4384 return BOOT_SWAP_TYPE_NONE; - 39d6: 2001 movs r0, #1 - 39d8: e000 b.n 39dc + 3a36: 2001 movs r0, #1 + 3a38: e000 b.n 3a3c return BOOT_SWAP_TYPE_PANIC; - 39da: 20ff movs r0, #255 ; 0xff + 3a3a: 20ff movs r0, #255 ; 0xff } - 39dc: b005 add sp, #20 - 39de: bd30 pop {r4, r5, pc} + 3a3c: b005 add sp, #20 + 3a3e: bd30 pop {r4, r5, pc} return BOOT_SWAP_TYPE_PANIC; - 39e0: 20ff movs r0, #255 ; 0xff - 39e2: e7fb b.n 39dc - 39e4: 0000569c .word 0x0000569c - 39e8: 000055d8 .word 0x000055d8 - 39ec: 000056c0 .word 0x000056c0 - 39f0: 000056b8 .word 0x000056b8 - 39f4: 000056c8 .word 0x000056c8 - 39f8: 000056b0 .word 0x000056b0 - 39fc: 000056e0 .word 0x000056e0 - -00003a00 : + 3a40: 20ff movs r0, #255 ; 0xff + 3a42: e7fb b.n 3a3c + 3a44: 00005744 .word 0x00005744 + 3a48: 00005680 .word 0x00005680 + 3a4c: 00005768 .word 0x00005768 + 3a50: 00005760 .word 0x00005760 + 3a54: 00005770 .word 0x00005770 + 3a58: 00005758 .word 0x00005758 + 3a5c: 00005788 .word 0x00005788 + +00003a60 : static int bootutil_img_hash(struct enc_key_data *enc_state, int image_index, struct image_header *hdr, const struct flash_area *fap, uint8_t *tmp_buf, uint32_t tmp_buf_sz, uint8_t *hash_result, uint8_t *seed, int seed_len) { - 3a00: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} - 3a04: b09d sub sp, #116 ; 0x74 - 3a06: 4615 mov r5, r2 - 3a08: 4699 mov r9, r3 - 3a0a: 9f24 ldr r7, [sp, #144] ; 0x90 - 3a0c: f8dd 8094 ldr.w r8, [sp, #148] ; 0x94 - 3a10: 9c27 ldr r4, [sp, #156] ; 0x9c + 3a60: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} + 3a64: b09d sub sp, #116 ; 0x74 + 3a66: 4615 mov r5, r2 + 3a68: 4699 mov r9, r3 + 3a6a: 9f24 ldr r7, [sp, #144] ; 0x90 + 3a6c: f8dd 8094 ldr.w r8, [sp, #148] ; 0x94 + 3a70: 9c27 ldr r4, [sp, #156] ; 0x9c #ifdef MCUBOOT_USE_MBED_TLS typedef mbedtls_sha256_context bootutil_sha256_context; static inline void bootutil_sha256_init(bootutil_sha256_context *ctx) { mbedtls_sha256_init(ctx); - 3a12: a801 add r0, sp, #4 - 3a14: f000 f95a bl 3ccc + 3a72: a801 add r0, sp, #4 + 3a74: f000 f95a bl 3d2c (void)mbedtls_sha256_starts_ret(ctx, 0); - 3a18: 2100 movs r1, #0 - 3a1a: a801 add r0, sp, #4 - 3a1c: f000 f95c bl 3cd8 + 3a78: 2100 movs r1, #0 + 3a7a: a801 add r0, sp, #4 + 3a7c: f000 f95c bl 3d38 bootutil_sha256_init(&sha256_ctx); /* in some cases (split image) the hash is seeded with data from * the loader image */ if (seed && (seed_len > 0)) { - 3a20: b114 cbz r4, 3a28 - 3a22: 9b28 ldr r3, [sp, #160] ; 0xa0 - 3a24: 2b00 cmp r3, #0 - 3a26: dc06 bgt.n 3a36 + 3a80: b114 cbz r4, 3a88 + 3a82: 9b28 ldr r3, [sp, #160] ; 0xa0 + 3a84: 2b00 cmp r3, #0 + 3a86: dc06 bgt.n 3a96 bootutil_sha256_update(&sha256_ctx, seed, seed_len); } /* Hash is computed over image header and image itself. */ size = hdr_size = hdr->ih_hdr_size; - 3a28: 892b ldrh r3, [r5, #8] + 3a88: 892b ldrh r3, [r5, #8] size += hdr->ih_img_size; - 3a2a: 68ee ldr r6, [r5, #12] - 3a2c: 4433 add r3, r6 + 3a8a: 68ee ldr r6, [r5, #12] + 3a8c: 4433 add r3, r6 tlv_off = size; /* If protected TLVs are present they are also hashed. */ size += hdr->ih_protect_tlv_size; - 3a2e: 896e ldrh r6, [r5, #10] - 3a30: 441e add r6, r3 + 3a8e: 896e ldrh r6, [r5, #10] + 3a90: 441e add r6, r3 for (off = 0; off < size; off += blk_sz) { - 3a32: 2500 movs r5, #0 - 3a34: e013 b.n 3a5e + 3a92: 2500 movs r5, #0 + 3a94: e013 b.n 3abe static inline void bootutil_sha256_update(bootutil_sha256_context *ctx, const void *data, uint32_t data_len) { (void)mbedtls_sha256_update_ret(ctx, data, data_len); - 3a36: 461a mov r2, r3 - 3a38: 4621 mov r1, r4 - 3a3a: a801 add r0, sp, #4 - 3a3c: f000 fa32 bl 3ea4 - 3a40: e7f2 b.n 3a28 + 3a96: 461a mov r2, r3 + 3a98: 4621 mov r1, r4 + 3a9a: a801 add r0, sp, #4 + 3a9c: f000 fa32 bl 3f04 + 3aa0: e7f2 b.n 3a88 if ((off < tlv_off) && ((off + blk_sz) > tlv_off)) { /* read only up to the end of the image payload */ blk_sz = tlv_off - off; } #endif rc = flash_area_read(fap, off, tmp_buf, blk_sz); - 3a42: 4623 mov r3, r4 - 3a44: 463a mov r2, r7 - 3a46: 4629 mov r1, r5 - 3a48: 4648 mov r0, r9 - 3a4a: f000 fff7 bl 4a3c + 3aa2: 4623 mov r3, r4 + 3aa4: 463a mov r2, r7 + 3aa6: 4629 mov r1, r5 + 3aa8: 4648 mov r0, r9 + 3aaa: f000 fff7 bl 4a9c if (rc) { - 3a4e: 4603 mov r3, r0 - 3a50: b988 cbnz r0, 3a76 - 3a52: 4622 mov r2, r4 - 3a54: 4639 mov r1, r7 - 3a56: a801 add r0, sp, #4 - 3a58: f000 fa24 bl 3ea4 + 3aae: 4603 mov r3, r0 + 3ab0: b988 cbnz r0, 3ad6 + 3ab2: 4622 mov r2, r4 + 3ab4: 4639 mov r1, r7 + 3ab6: a801 add r0, sp, #4 + 3ab8: f000 fa24 bl 3f04 for (off = 0; off < size; off += blk_sz) { - 3a5c: 4425 add r5, r4 - 3a5e: 42b5 cmp r5, r6 - 3a60: d204 bcs.n 3a6c + 3abc: 4425 add r5, r4 + 3abe: 42b5 cmp r5, r6 + 3ac0: d204 bcs.n 3acc blk_sz = size - off; - 3a62: 1b74 subs r4, r6, r5 + 3ac2: 1b74 subs r4, r6, r5 if (blk_sz > tmp_buf_sz) { - 3a64: 4544 cmp r4, r8 - 3a66: d9ec bls.n 3a42 + 3ac4: 4544 cmp r4, r8 + 3ac6: d9ec bls.n 3aa2 blk_sz = tmp_buf_sz; - 3a68: 4644 mov r4, r8 - 3a6a: e7ea b.n 3a42 + 3ac8: 4644 mov r4, r8 + 3aca: e7ea b.n 3aa2 } static inline void bootutil_sha256_finish(bootutil_sha256_context *ctx, uint8_t *output) { (void)mbedtls_sha256_finish_ret(ctx, output); - 3a6c: 9926 ldr r1, [sp, #152] ; 0x98 - 3a6e: a801 add r0, sp, #4 - 3a70: f000 fa5b bl 3f2a + 3acc: 9926 ldr r1, [sp, #152] ; 0x98 + 3ace: a801 add r0, sp, #4 + 3ad0: f000 fa5b bl 3f8a #endif bootutil_sha256_update(&sha256_ctx, tmp_buf, blk_sz); } bootutil_sha256_finish(&sha256_ctx, hash_result); return 0; - 3a74: 2300 movs r3, #0 + 3ad4: 2300 movs r3, #0 } - 3a76: 4618 mov r0, r3 - 3a78: b01d add sp, #116 ; 0x74 - 3a7a: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} + 3ad6: 4618 mov r0, r3 + 3ad8: b01d add sp, #116 ; 0x74 + 3ada: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} -00003a7e : +00003ade : int bootutil_img_validate(struct enc_key_data *enc_state, int image_index, struct image_header *hdr, const struct flash_area *fap, uint8_t *tmp_buf, uint32_t tmp_buf_sz, uint8_t *seed, int seed_len, uint8_t *out_hash) { - 3a7e: b5f0 push {r4, r5, r6, r7, lr} - 3a80: b09f sub sp, #124 ; 0x7c - 3a82: 4617 mov r7, r2 - 3a84: 461e mov r6, r3 - 3a86: 9d28 ldr r5, [sp, #160] ; 0xa0 + 3ade: b5f0 push {r4, r5, r6, r7, lr} + 3ae0: b09f sub sp, #124 ; 0x7c + 3ae2: 4617 mov r7, r2 + 3ae4: 461e mov r6, r3 + 3ae6: 9d28 ldr r5, [sp, #160] ; 0xa0 struct image_tlv_iter it; uint8_t buf[SIG_BUF_SIZE]; uint8_t hash[32]; int rc; rc = bootutil_img_hash(enc_state, image_index, hdr, fap, tmp_buf, - 3a88: 9c27 ldr r4, [sp, #156] ; 0x9c - 3a8a: 9404 str r4, [sp, #16] - 3a8c: 9c26 ldr r4, [sp, #152] ; 0x98 - 3a8e: 9403 str r4, [sp, #12] - 3a90: ac06 add r4, sp, #24 - 3a92: 9402 str r4, [sp, #8] - 3a94: 9c25 ldr r4, [sp, #148] ; 0x94 - 3a96: 9401 str r4, [sp, #4] - 3a98: 9c24 ldr r4, [sp, #144] ; 0x90 - 3a9a: 9400 str r4, [sp, #0] - 3a9c: f7ff ffb0 bl 3a00 + 3ae8: 9c27 ldr r4, [sp, #156] ; 0x9c + 3aea: 9404 str r4, [sp, #16] + 3aec: 9c26 ldr r4, [sp, #152] ; 0x98 + 3aee: 9403 str r4, [sp, #12] + 3af0: ac06 add r4, sp, #24 + 3af2: 9402 str r4, [sp, #8] + 3af4: 9c25 ldr r4, [sp, #148] ; 0x94 + 3af6: 9401 str r4, [sp, #4] + 3af8: 9c24 ldr r4, [sp, #144] ; 0x90 + 3afa: 9400 str r4, [sp, #0] + 3afc: f7ff ffb0 bl 3a60 tmp_buf_sz, hash, seed, seed_len); if (rc) { - 3aa0: 4604 mov r4, r0 - 3aa2: 2800 cmp r0, #0 - 3aa4: d140 bne.n 3b28 + 3b00: 4604 mov r4, r0 + 3b02: 2800 cmp r0, #0 + 3b04: d140 bne.n 3b88 return rc; } if (out_hash) { - 3aa6: b155 cbz r5, 3abe + 3b06: b155 cbz r5, 3b1e memcpy(out_hash, hash, 32); - 3aa8: ac06 add r4, sp, #24 - 3aaa: cc0f ldmia r4!, {r0, r1, r2, r3} - 3aac: 6028 str r0, [r5, #0] - 3aae: 6069 str r1, [r5, #4] - 3ab0: 60aa str r2, [r5, #8] - 3ab2: 60eb str r3, [r5, #12] - 3ab4: cc0f ldmia r4!, {r0, r1, r2, r3} - 3ab6: 6128 str r0, [r5, #16] - 3ab8: 6169 str r1, [r5, #20] - 3aba: 61aa str r2, [r5, #24] - 3abc: 61eb str r3, [r5, #28] + 3b08: ac06 add r4, sp, #24 + 3b0a: cc0f ldmia r4!, {r0, r1, r2, r3} + 3b0c: 6028 str r0, [r5, #0] + 3b0e: 6069 str r1, [r5, #4] + 3b10: 60aa str r2, [r5, #8] + 3b12: 60eb str r3, [r5, #12] + 3b14: cc0f ldmia r4!, {r0, r1, r2, r3} + 3b16: 6128 str r0, [r5, #16] + 3b18: 6169 str r1, [r5, #20] + 3b1a: 61aa str r2, [r5, #24] + 3b1c: 61eb str r3, [r5, #28] } rc = bootutil_tlv_iter_begin(&it, hdr, fap, IMAGE_TLV_ANY, false); - 3abe: 2300 movs r3, #0 - 3ac0: 9300 str r3, [sp, #0] - 3ac2: f64f 73ff movw r3, #65535 ; 0xffff - 3ac6: 4632 mov r2, r6 - 3ac8: 4639 mov r1, r7 - 3aca: a816 add r0, sp, #88 ; 0x58 - 3acc: f000 f834 bl 3b38 + 3b1e: 2300 movs r3, #0 + 3b20: 9300 str r3, [sp, #0] + 3b22: f64f 73ff movw r3, #65535 ; 0xffff + 3b26: 4632 mov r2, r6 + 3b28: 4639 mov r1, r7 + 3b2a: a816 add r0, sp, #88 ; 0x58 + 3b2c: f000 f834 bl 3b98 if (rc) { - 3ad0: 4604 mov r4, r0 - 3ad2: bb48 cbnz r0, 3b28 + 3b30: 4604 mov r4, r0 + 3b32: bb48 cbnz r0, 3b88 int sha256_valid = 0; - 3ad4: 4605 mov r5, r0 + 3b34: 4605 mov r5, r0 /* * Traverse through all of the TLVs, performing any checks we know * and are able to do. */ while (true) { rc = bootutil_tlv_iter_next(&it, &off, &len, &type); - 3ad6: ab1c add r3, sp, #112 ; 0x70 - 3ad8: f10d 0272 add.w r2, sp, #114 ; 0x72 - 3adc: a91d add r1, sp, #116 ; 0x74 - 3ade: a816 add r0, sp, #88 ; 0x58 - 3ae0: f000 f88f bl 3c02 + 3b36: ab1c add r3, sp, #112 ; 0x70 + 3b38: f10d 0272 add.w r2, sp, #114 ; 0x72 + 3b3c: a91d add r1, sp, #116 ; 0x74 + 3b3e: a816 add r0, sp, #88 ; 0x58 + 3b40: f000 f88f bl 3c62 if (rc < 0) { - 3ae4: 2800 cmp r0, #0 - 3ae6: db1d blt.n 3b24 + 3b44: 2800 cmp r0, #0 + 3b46: db1d blt.n 3b84 return -1; } else if (rc > 0) { - 3ae8: dc18 bgt.n 3b1c + 3b48: dc18 bgt.n 3b7c break; } if (type == IMAGE_TLV_SHA256) { - 3aea: f8bd 3070 ldrh.w r3, [sp, #112] ; 0x70 - 3aee: 2b10 cmp r3, #16 - 3af0: d1f1 bne.n 3ad6 + 3b4a: f8bd 3070 ldrh.w r3, [sp, #112] ; 0x70 + 3b4e: 2b10 cmp r3, #16 + 3b50: d1f1 bne.n 3b36 /* * Verify the SHA256 image hash. This must always be * present. */ if (len != sizeof(hash)) { - 3af2: f8bd 3072 ldrh.w r3, [sp, #114] ; 0x72 - 3af6: 2b20 cmp r3, #32 - 3af8: d119 bne.n 3b2e + 3b52: f8bd 3072 ldrh.w r3, [sp, #114] ; 0x72 + 3b56: 2b20 cmp r3, #32 + 3b58: d119 bne.n 3b8e return -1; } rc = flash_area_read(fap, off, buf, sizeof hash); - 3afa: aa0e add r2, sp, #56 ; 0x38 - 3afc: 991d ldr r1, [sp, #116] ; 0x74 - 3afe: 4630 mov r0, r6 - 3b00: f000 ff9c bl 4a3c + 3b5a: aa0e add r2, sp, #56 ; 0x38 + 3b5c: 991d ldr r1, [sp, #116] ; 0x74 + 3b5e: 4630 mov r0, r6 + 3b60: f000 ff9c bl 4a9c if (rc) { - 3b04: b9b0 cbnz r0, 3b34 + 3b64: b9b0 cbnz r0, 3b94 return rc; } if (memcmp(hash, buf, sizeof(hash))) { - 3b06: 2220 movs r2, #32 - 3b08: a90e add r1, sp, #56 ; 0x38 - 3b0a: a806 add r0, sp, #24 - 3b0c: f7fe f931 bl 1d72 + 3b66: 2220 movs r2, #32 + 3b68: a90e add r1, sp, #56 ; 0x38 + 3b6a: a806 add r0, sp, #24 + 3b6c: f7fe f901 bl 1d72 return -1; } sha256_valid = 1; - 3b10: 2501 movs r5, #1 + 3b70: 2501 movs r5, #1 if (memcmp(hash, buf, sizeof(hash))) { - 3b12: 2800 cmp r0, #0 - 3b14: d0df beq.n 3ad6 + 3b72: 2800 cmp r0, #0 + 3b74: d0df beq.n 3b36 return -1; - 3b16: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff - 3b1a: e005 b.n 3b28 + 3b76: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff + 3b7a: e005 b.n 3b88 key_id = -1; #endif } } if (!sha256_valid) { - 3b1c: b925 cbnz r5, 3b28 + 3b7c: b925 cbnz r5, 3b88 return -1; - 3b1e: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff - 3b22: e001 b.n 3b28 + 3b7e: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff + 3b82: e001 b.n 3b88 return -1; - 3b24: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff + 3b84: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff return -1; } #endif return 0; } - 3b28: 4620 mov r0, r4 - 3b2a: b01f add sp, #124 ; 0x7c - 3b2c: bdf0 pop {r4, r5, r6, r7, pc} + 3b88: 4620 mov r0, r4 + 3b8a: b01f add sp, #124 ; 0x7c + 3b8c: bdf0 pop {r4, r5, r6, r7, pc} return -1; - 3b2e: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff - 3b32: e7f9 b.n 3b28 + 3b8e: f04f 34ff mov.w r4, #4294967295 ; 0xffffffff + 3b92: e7f9 b.n 3b88 return rc; - 3b34: 4604 mov r4, r0 - 3b36: e7f7 b.n 3b28 + 3b94: 4604 mov r4, r0 + 3b96: e7f7 b.n 3b88 -00003b38 : +00003b98 : * -1 on errors */ int bootutil_tlv_iter_begin(struct image_tlv_iter *it, const struct image_header *hdr, const struct flash_area *fap, uint16_t type, bool prot) { - 3b38: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} - 3b3c: b083 sub sp, #12 + 3b98: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} + 3b9c: b083 sub sp, #12 uint32_t off_; struct image_tlv_info info; if (it == NULL || hdr == NULL || fap == NULL) { - 3b3e: 2800 cmp r0, #0 - 3b40: d04a beq.n 3bd8 - 3b42: 4605 mov r5, r0 - 3b44: 2900 cmp r1, #0 - 3b46: d04a beq.n 3bde - 3b48: 2a00 cmp r2, #0 - 3b4a: d04b beq.n 3be4 - 3b4c: 4699 mov r9, r3 - 3b4e: 4617 mov r7, r2 - 3b50: 460c mov r4, r1 + 3b9e: 2800 cmp r0, #0 + 3ba0: d04a beq.n 3c38 + 3ba2: 4605 mov r5, r0 + 3ba4: 2900 cmp r1, #0 + 3ba6: d04a beq.n 3c3e + 3ba8: 2a00 cmp r2, #0 + 3baa: d04b beq.n 3c44 + 3bac: 4699 mov r9, r3 + 3bae: 4617 mov r7, r2 + 3bb0: 460c mov r4, r1 return -1; } off_ = BOOT_TLV_OFF(hdr); - 3b52: 890e ldrh r6, [r1, #8] - 3b54: 68cb ldr r3, [r1, #12] - 3b56: 441e add r6, r3 + 3bb2: 890e ldrh r6, [r1, #8] + 3bb4: 68cb ldr r3, [r1, #12] + 3bb6: 441e add r6, r3 if (flash_area_read(fap, off_, &info, sizeof(info))) { - 3b58: 2304 movs r3, #4 - 3b5a: eb0d 0203 add.w r2, sp, r3 - 3b5e: 4631 mov r1, r6 - 3b60: 4638 mov r0, r7 - 3b62: f000 ff6b bl 4a3c - 3b66: 4680 mov r8, r0 - 3b68: 2800 cmp r0, #0 - 3b6a: d13e bne.n 3bea + 3bb8: 2304 movs r3, #4 + 3bba: eb0d 0203 add.w r2, sp, r3 + 3bbe: 4631 mov r1, r6 + 3bc0: 4638 mov r0, r7 + 3bc2: f000 ff6b bl 4a9c + 3bc6: 4680 mov r8, r0 + 3bc8: 2800 cmp r0, #0 + 3bca: d13e bne.n 3c4a return -1; } if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { - 3b6c: f8bd 2004 ldrh.w r2, [sp, #4] - 3b70: f646 1308 movw r3, #26888 ; 0x6908 - 3b74: 429a cmp r2, r3 - 3b76: d01e beq.n 3bb6 + 3bcc: f8bd 2004 ldrh.w r2, [sp, #4] + 3bd0: f646 1308 movw r3, #26888 ; 0x6908 + 3bd4: 429a cmp r2, r3 + 3bd6: d01e beq.n 3c16 } if (flash_area_read(fap, off_ + info.it_tlv_tot, &info, sizeof(info))) { return -1; } } else if (hdr->ih_protect_tlv_size != 0) { - 3b78: 8963 ldrh r3, [r4, #10] - 3b7a: 2b00 cmp r3, #0 - 3b7c: d13b bne.n 3bf6 + 3bd8: 8963 ldrh r3, [r4, #10] + 3bda: 2b00 cmp r3, #0 + 3bdc: d13b bne.n 3c56 return -1; } if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { - 3b7e: f8bd 2004 ldrh.w r2, [sp, #4] - 3b82: f646 1307 movw r3, #26887 ; 0x6907 - 3b86: 429a cmp r2, r3 - 3b88: d138 bne.n 3bfc + 3bde: f8bd 2004 ldrh.w r2, [sp, #4] + 3be2: f646 1307 movw r3, #26887 ; 0x6907 + 3be6: 429a cmp r2, r3 + 3be8: d138 bne.n 3c5c return -1; } it->hdr = hdr; - 3b8a: 602c str r4, [r5, #0] + 3bea: 602c str r4, [r5, #0] it->fap = fap; - 3b8c: 606f str r7, [r5, #4] + 3bec: 606f str r7, [r5, #4] it->type = type; - 3b8e: f8a5 9008 strh.w r9, [r5, #8] + 3bee: f8a5 9008 strh.w r9, [r5, #8] it->prot = prot; - 3b92: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 - 3b96: 72ab strb r3, [r5, #10] + 3bf2: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 + 3bf6: 72ab strb r3, [r5, #10] it->prot_end = off_ + it->hdr->ih_protect_tlv_size; - 3b98: 8963 ldrh r3, [r4, #10] - 3b9a: 4433 add r3, r6 - 3b9c: 60eb str r3, [r5, #12] + 3bf8: 8963 ldrh r3, [r4, #10] + 3bfa: 4433 add r3, r6 + 3bfc: 60eb str r3, [r5, #12] it->tlv_end = off_ + it->hdr->ih_protect_tlv_size + info.it_tlv_tot; - 3b9e: 8963 ldrh r3, [r4, #10] - 3ba0: 4433 add r3, r6 - 3ba2: f8bd 2006 ldrh.w r2, [sp, #6] - 3ba6: 4413 add r3, r2 - 3ba8: 616b str r3, [r5, #20] + 3bfe: 8963 ldrh r3, [r4, #10] + 3c00: 4433 add r3, r6 + 3c02: f8bd 2006 ldrh.w r2, [sp, #6] + 3c06: 4413 add r3, r2 + 3c08: 616b str r3, [r5, #20] // position on first TLV it->tlv_off = off_ + sizeof(info); - 3baa: 3604 adds r6, #4 - 3bac: 612e str r6, [r5, #16] + 3c0a: 3604 adds r6, #4 + 3c0c: 612e str r6, [r5, #16] return 0; } - 3bae: 4640 mov r0, r8 - 3bb0: b003 add sp, #12 - 3bb2: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} + 3c0e: 4640 mov r0, r8 + 3c10: b003 add sp, #12 + 3c12: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} if (hdr->ih_protect_tlv_size != info.it_tlv_tot) { - 3bb6: 8963 ldrh r3, [r4, #10] - 3bb8: f8bd 1006 ldrh.w r1, [sp, #6] - 3bbc: 428b cmp r3, r1 - 3bbe: d117 bne.n 3bf0 + 3c16: 8963 ldrh r3, [r4, #10] + 3c18: f8bd 1006 ldrh.w r1, [sp, #6] + 3c1c: 428b cmp r3, r1 + 3c1e: d117 bne.n 3c50 if (flash_area_read(fap, off_ + info.it_tlv_tot, &info, sizeof(info))) { - 3bc0: 2304 movs r3, #4 - 3bc2: eb0d 0203 add.w r2, sp, r3 - 3bc6: 4431 add r1, r6 - 3bc8: 4638 mov r0, r7 - 3bca: f000 ff37 bl 4a3c - 3bce: 2800 cmp r0, #0 - 3bd0: d0d5 beq.n 3b7e + 3c20: 2304 movs r3, #4 + 3c22: eb0d 0203 add.w r2, sp, r3 + 3c26: 4431 add r1, r6 + 3c28: 4638 mov r0, r7 + 3c2a: f000 ff37 bl 4a9c + 3c2e: 2800 cmp r0, #0 + 3c30: d0d5 beq.n 3bde return -1; - 3bd2: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3bd6: e7ea b.n 3bae + 3c32: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c36: e7ea b.n 3c0e return -1; - 3bd8: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3bdc: e7e7 b.n 3bae - 3bde: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3be2: e7e4 b.n 3bae - 3be4: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3be8: e7e1 b.n 3bae + 3c38: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c3c: e7e7 b.n 3c0e + 3c3e: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c42: e7e4 b.n 3c0e + 3c44: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c48: e7e1 b.n 3c0e return -1; - 3bea: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3bee: e7de b.n 3bae + 3c4a: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c4e: e7de b.n 3c0e return -1; - 3bf0: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3bf4: e7db b.n 3bae + 3c50: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c54: e7db b.n 3c0e return -1; - 3bf6: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3bfa: e7d8 b.n 3bae + 3c56: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c5a: e7d8 b.n 3c0e return -1; - 3bfc: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff - 3c00: e7d5 b.n 3bae + 3c5c: f04f 38ff mov.w r8, #4294967295 ; 0xffffffff + 3c60: e7d5 b.n 3c0e -00003c02 : +00003c62 : uint16_t *type) { struct image_tlv tlv; int rc; if (it == NULL || it->hdr == NULL || it->fap == NULL) { - 3c02: 2800 cmp r0, #0 - 3c04: d04d beq.n 3ca2 + 3c62: 2800 cmp r0, #0 + 3c64: d04d beq.n 3d02 { - 3c06: b5f0 push {r4, r5, r6, r7, lr} - 3c08: b083 sub sp, #12 - 3c0a: 4604 mov r4, r0 + 3c66: b5f0 push {r4, r5, r6, r7, lr} + 3c68: b083 sub sp, #12 + 3c6a: 4604 mov r4, r0 if (it == NULL || it->hdr == NULL || it->fap == NULL) { - 3c0c: 6800 ldr r0, [r0, #0] - 3c0e: 2800 cmp r0, #0 - 3c10: d04b beq.n 3caa - 3c12: 461d mov r5, r3 - 3c14: 4616 mov r6, r2 - 3c16: 460f mov r7, r1 - 3c18: 6863 ldr r3, [r4, #4] - 3c1a: bb0b cbnz r3, 3c60 + 3c6c: 6800 ldr r0, [r0, #0] + 3c6e: 2800 cmp r0, #0 + 3c70: d04b beq.n 3d0a + 3c72: 461d mov r5, r3 + 3c74: 4616 mov r6, r2 + 3c76: 460f mov r7, r1 + 3c78: 6863 ldr r3, [r4, #4] + 3c7a: bb0b cbnz r3, 3cc0 return -1; - 3c1c: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff - 3c20: e03a b.n 3c98 + 3c7c: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff + 3c80: e03a b.n 3cf8 while (it->tlv_off < it->tlv_end) { if (it->hdr->ih_protect_tlv_size > 0 && it->tlv_off == it->prot_end) { it->tlv_off += sizeof(struct image_tlv_info); } rc = flash_area_read(it->fap, it->tlv_off, &tlv, sizeof tlv); - 3c22: 2304 movs r3, #4 - 3c24: eb0d 0203 add.w r2, sp, r3 - 3c28: 6921 ldr r1, [r4, #16] - 3c2a: 6860 ldr r0, [r4, #4] - 3c2c: f000 ff06 bl 4a3c + 3c82: 2304 movs r3, #4 + 3c84: eb0d 0203 add.w r2, sp, r3 + 3c88: 6921 ldr r1, [r4, #16] + 3c8a: 6860 ldr r0, [r4, #4] + 3c8c: f000 ff06 bl 4a9c if (rc) { - 3c30: 4601 mov r1, r0 - 3c32: 2800 cmp r0, #0 - 3c34: d13c bne.n 3cb0 + 3c90: 4601 mov r1, r0 + 3c92: 2800 cmp r0, #0 + 3c94: d13c bne.n 3d10 return -1; } /* No more TLVs in the protected area */ if (it->prot && it->tlv_off >= it->prot_end) { - 3c36: 7aa3 ldrb r3, [r4, #10] - 3c38: b11b cbz r3, 3c42 - 3c3a: 6922 ldr r2, [r4, #16] - 3c3c: 68e3 ldr r3, [r4, #12] - 3c3e: 429a cmp r2, r3 - 3c40: d239 bcs.n 3cb6 + 3c96: 7aa3 ldrb r3, [r4, #10] + 3c98: b11b cbz r3, 3ca2 + 3c9a: 6922 ldr r2, [r4, #16] + 3c9c: 68e3 ldr r3, [r4, #12] + 3c9e: 429a cmp r2, r3 + 3ca0: d239 bcs.n 3d16 return 1; } if (it->type == IMAGE_TLV_ANY || tlv.it_type == it->type) { - 3c42: 8923 ldrh r3, [r4, #8] - 3c44: f64f 72ff movw r2, #65535 ; 0xffff - 3c48: 4293 cmp r3, r2 - 3c4a: d017 beq.n 3c7c - 3c4c: f8bd 2004 ldrh.w r2, [sp, #4] - 3c50: 4293 cmp r3, r2 - 3c52: d013 beq.n 3c7c + 3ca2: 8923 ldrh r3, [r4, #8] + 3ca4: f64f 72ff movw r2, #65535 ; 0xffff + 3ca8: 4293 cmp r3, r2 + 3caa: d017 beq.n 3cdc + 3cac: f8bd 2004 ldrh.w r2, [sp, #4] + 3cb0: 4293 cmp r3, r2 + 3cb2: d013 beq.n 3cdc *len = tlv.it_len; it->tlv_off += sizeof(tlv) + tlv.it_len; return 0; } it->tlv_off += sizeof(tlv) + tlv.it_len; - 3c54: f8bd 0006 ldrh.w r0, [sp, #6] - 3c58: 6923 ldr r3, [r4, #16] - 3c5a: 4418 add r0, r3 - 3c5c: 3004 adds r0, #4 - 3c5e: 6120 str r0, [r4, #16] + 3cb4: f8bd 0006 ldrh.w r0, [sp, #6] + 3cb8: 6923 ldr r3, [r4, #16] + 3cba: 4418 add r0, r3 + 3cbc: 3004 adds r0, #4 + 3cbe: 6120 str r0, [r4, #16] while (it->tlv_off < it->tlv_end) { - 3c60: 6920 ldr r0, [r4, #16] - 3c62: 6963 ldr r3, [r4, #20] - 3c64: 4298 cmp r0, r3 - 3c66: d21a bcs.n 3c9e + 3cc0: 6920 ldr r0, [r4, #16] + 3cc2: 6963 ldr r3, [r4, #20] + 3cc4: 4298 cmp r0, r3 + 3cc6: d21a bcs.n 3cfe if (it->hdr->ih_protect_tlv_size > 0 && it->tlv_off == it->prot_end) { - 3c68: 6823 ldr r3, [r4, #0] - 3c6a: 895b ldrh r3, [r3, #10] - 3c6c: 2b00 cmp r3, #0 - 3c6e: d0d8 beq.n 3c22 - 3c70: 68e3 ldr r3, [r4, #12] - 3c72: 4283 cmp r3, r0 - 3c74: d1d5 bne.n 3c22 + 3cc8: 6823 ldr r3, [r4, #0] + 3cca: 895b ldrh r3, [r3, #10] + 3ccc: 2b00 cmp r3, #0 + 3cce: d0d8 beq.n 3c82 + 3cd0: 68e3 ldr r3, [r4, #12] + 3cd2: 4283 cmp r3, r0 + 3cd4: d1d5 bne.n 3c82 it->tlv_off += sizeof(struct image_tlv_info); - 3c76: 3004 adds r0, #4 - 3c78: 6120 str r0, [r4, #16] - 3c7a: e7d2 b.n 3c22 + 3cd6: 3004 adds r0, #4 + 3cd8: 6120 str r0, [r4, #16] + 3cda: e7d2 b.n 3c82 if (type != NULL) { - 3c7c: b115 cbz r5, 3c84 + 3cdc: b115 cbz r5, 3ce4 *type = tlv.it_type; - 3c7e: f8bd 3004 ldrh.w r3, [sp, #4] - 3c82: 802b strh r3, [r5, #0] + 3cde: f8bd 3004 ldrh.w r3, [sp, #4] + 3ce2: 802b strh r3, [r5, #0] *off = it->tlv_off + sizeof(tlv); - 3c84: 6923 ldr r3, [r4, #16] - 3c86: 3304 adds r3, #4 - 3c88: 603b str r3, [r7, #0] + 3ce4: 6923 ldr r3, [r4, #16] + 3ce6: 3304 adds r3, #4 + 3ce8: 603b str r3, [r7, #0] *len = tlv.it_len; - 3c8a: f8bd 3006 ldrh.w r3, [sp, #6] - 3c8e: 8033 strh r3, [r6, #0] + 3cea: f8bd 3006 ldrh.w r3, [sp, #6] + 3cee: 8033 strh r3, [r6, #0] it->tlv_off += sizeof(tlv) + tlv.it_len; - 3c90: 6922 ldr r2, [r4, #16] - 3c92: 4413 add r3, r2 - 3c94: 3304 adds r3, #4 - 3c96: 6123 str r3, [r4, #16] + 3cf0: 6922 ldr r2, [r4, #16] + 3cf2: 4413 add r3, r2 + 3cf4: 3304 adds r3, #4 + 3cf6: 6123 str r3, [r4, #16] } return 1; } - 3c98: 4608 mov r0, r1 - 3c9a: b003 add sp, #12 - 3c9c: bdf0 pop {r4, r5, r6, r7, pc} + 3cf8: 4608 mov r0, r1 + 3cfa: b003 add sp, #12 + 3cfc: bdf0 pop {r4, r5, r6, r7, pc} return 1; - 3c9e: 2101 movs r1, #1 - 3ca0: e7fa b.n 3c98 + 3cfe: 2101 movs r1, #1 + 3d00: e7fa b.n 3cf8 return -1; - 3ca2: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff + 3d02: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff } - 3ca6: 4608 mov r0, r1 - 3ca8: 4770 bx lr + 3d06: 4608 mov r0, r1 + 3d08: 4770 bx lr return -1; - 3caa: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff - 3cae: e7f3 b.n 3c98 + 3d0a: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff + 3d0e: e7f3 b.n 3cf8 return -1; - 3cb0: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff - 3cb4: e7f0 b.n 3c98 + 3d10: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff + 3d14: e7f0 b.n 3cf8 return 1; - 3cb6: 2101 movs r1, #1 - 3cb8: e7ee b.n 3c98 + 3d16: 2101 movs r1, #1 + 3d18: e7ee b.n 3cf8 -00003cba : +00003d1a : #include #include int flash_area_id_from_multi_image_slot(int image_index, int slot) { switch (slot) { - 3cba: b119 cbz r1, 3cc4 - 3cbc: 2901 cmp r1, #1 - 3cbe: d003 beq.n 3cc8 + 3d1a: b119 cbz r1, 3d24 + 3d1c: 2901 cmp r1, #1 + 3d1e: d003 beq.n 3d28 case 1: return FLASH_AREA_IMAGE_SECONDARY(image_index); #if MCUBOOT_SWAP_USING_SCRATCH case 2: return FLASH_AREA_IMAGE_SCRATCH; #endif } return 255; - 3cc0: 20ff movs r0, #255 ; 0xff - 3cc2: 4770 bx lr + 3d20: 20ff movs r0, #255 ; 0xff + 3d22: 4770 bx lr case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index); - 3cc4: 2001 movs r0, #1 - 3cc6: 4770 bx lr + 3d24: 2001 movs r0, #1 + 3d26: 4770 bx lr case 1: return FLASH_AREA_IMAGE_SECONDARY(image_index); - 3cc8: 2002 movs r0, #2 + 3d28: 2002 movs r0, #2 } - 3cca: 4770 bx lr + 3d2a: 4770 bx lr -00003ccc : +00003d2c : (b)[(i) + 3] = (unsigned char) ( (n) ); \ } while( 0 ) #endif void mbedtls_sha256_init( mbedtls_sha256_context *ctx ) { - 3ccc: b508 push {r3, lr} + 3d2c: b508 push {r3, lr} memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); - 3cce: 226c movs r2, #108 ; 0x6c - 3cd0: 2100 movs r1, #0 - 3cd2: f7fe f87f bl 1dd4 + 3d2e: 226c movs r2, #108 ; 0x6c + 3d30: 2100 movs r1, #0 + 3d32: f7fe f84f bl 1dd4 } - 3cd6: bd08 pop {r3, pc} + 3d36: bd08 pop {r3, pc} -00003cd8 : +00003d38 : /* * SHA-256 context setup */ int mbedtls_sha256_starts_ret( mbedtls_sha256_context *ctx, int is224 ) { ctx->total[0] = 0; - 3cd8: 2300 movs r3, #0 - 3cda: 6003 str r3, [r0, #0] + 3d38: 2300 movs r3, #0 + 3d3a: 6003 str r3, [r0, #0] ctx->total[1] = 0; - 3cdc: 6043 str r3, [r0, #4] + 3d3c: 6043 str r3, [r0, #4] if( is224 == 0 ) - 3cde: 460b mov r3, r1 - 3ce0: b1e1 cbz r1, 3d1c + 3d3e: 460b mov r3, r1 + 3d40: b1e1 cbz r1, 3d7c ctx->state[7] = 0x5BE0CD19; } else { /* SHA-224 */ ctx->state[0] = 0xC1059ED8; - 3ce2: 4a19 ldr r2, [pc, #100] ; (3d48 ) - 3ce4: 6082 str r2, [r0, #8] + 3d42: 4a19 ldr r2, [pc, #100] ; (3da8 ) + 3d44: 6082 str r2, [r0, #8] ctx->state[1] = 0x367CD507; - 3ce6: 4a19 ldr r2, [pc, #100] ; (3d4c ) - 3ce8: 60c2 str r2, [r0, #12] + 3d46: 4a19 ldr r2, [pc, #100] ; (3dac ) + 3d48: 60c2 str r2, [r0, #12] ctx->state[2] = 0x3070DD17; - 3cea: f102 4279 add.w r2, r2, #4177526784 ; 0xf9000000 - 3cee: f502 0274 add.w r2, r2, #15990784 ; 0xf40000 - 3cf2: f502 6201 add.w r2, r2, #2064 ; 0x810 - 3cf6: 6102 str r2, [r0, #16] + 3d4a: f102 4279 add.w r2, r2, #4177526784 ; 0xf9000000 + 3d4e: f502 0274 add.w r2, r2, #15990784 ; 0xf40000 + 3d52: f502 6201 add.w r2, r2, #2064 ; 0x810 + 3d56: 6102 str r2, [r0, #16] ctx->state[3] = 0xF70E5939; - 3cf8: 4a15 ldr r2, [pc, #84] ; (3d50 ) - 3cfa: 6142 str r2, [r0, #20] + 3d58: 4a15 ldr r2, [pc, #84] ; (3db0 ) + 3d5a: 6142 str r2, [r0, #20] ctx->state[4] = 0xFFC00B31; - 3cfc: 4a15 ldr r2, [pc, #84] ; (3d54 ) - 3cfe: 6182 str r2, [r0, #24] + 3d5c: 4a15 ldr r2, [pc, #84] ; (3db4 ) + 3d5e: 6182 str r2, [r0, #24] ctx->state[5] = 0x68581511; - 3d00: f102 42d1 add.w r2, r2, #1753219072 ; 0x68800000 - 3d04: f502 12c0 add.w r2, r2, #1572864 ; 0x180000 - 3d08: f502 621e add.w r2, r2, #2528 ; 0x9e0 - 3d0c: 61c2 str r2, [r0, #28] + 3d60: f102 42d1 add.w r2, r2, #1753219072 ; 0x68800000 + 3d64: f502 12c0 add.w r2, r2, #1572864 ; 0x180000 + 3d68: f502 621e add.w r2, r2, #2528 ; 0x9e0 + 3d6c: 61c2 str r2, [r0, #28] ctx->state[6] = 0x64F98FA7; - 3d0e: 4a12 ldr r2, [pc, #72] ; (3d58 ) - 3d10: 6202 str r2, [r0, #32] + 3d6e: 4a12 ldr r2, [pc, #72] ; (3db8 ) + 3d70: 6202 str r2, [r0, #32] ctx->state[7] = 0xBEFA4FA4; - 3d12: 4a12 ldr r2, [pc, #72] ; (3d5c ) - 3d14: 6242 str r2, [r0, #36] ; 0x24 + 3d72: 4a12 ldr r2, [pc, #72] ; (3dbc ) + 3d74: 6242 str r2, [r0, #36] ; 0x24 } ctx->is224 = is224; - 3d16: 6683 str r3, [r0, #104] ; 0x68 + 3d76: 6683 str r3, [r0, #104] ; 0x68 return( 0 ); } - 3d18: 2000 movs r0, #0 - 3d1a: 4770 bx lr + 3d78: 2000 movs r0, #0 + 3d7a: 4770 bx lr ctx->state[0] = 0x6A09E667; - 3d1c: 4a10 ldr r2, [pc, #64] ; (3d60 ) - 3d1e: 6082 str r2, [r0, #8] + 3d7c: 4a10 ldr r2, [pc, #64] ; (3dc0 ) + 3d7e: 6082 str r2, [r0, #8] ctx->state[1] = 0xBB67AE85; - 3d20: 4a10 ldr r2, [pc, #64] ; (3d64 ) - 3d22: 60c2 str r2, [r0, #12] + 3d80: 4a10 ldr r2, [pc, #64] ; (3dc4 ) + 3d82: 60c2 str r2, [r0, #12] ctx->state[2] = 0x3C6EF372; - 3d24: 4a10 ldr r2, [pc, #64] ; (3d68 ) - 3d26: 6102 str r2, [r0, #16] + 3d84: 4a10 ldr r2, [pc, #64] ; (3dc8 ) + 3d86: 6102 str r2, [r0, #16] ctx->state[3] = 0xA54FF53A; - 3d28: 4a10 ldr r2, [pc, #64] ; (3d6c ) - 3d2a: 6142 str r2, [r0, #20] + 3d88: 4a10 ldr r2, [pc, #64] ; (3dcc ) + 3d8a: 6142 str r2, [r0, #20] ctx->state[4] = 0x510E527F; - 3d2c: 4a10 ldr r2, [pc, #64] ; (3d70 ) - 3d2e: 6182 str r2, [r0, #24] + 3d8c: 4a10 ldr r2, [pc, #64] ; (3dd0 ) + 3d8e: 6182 str r2, [r0, #24] ctx->state[5] = 0x9B05688C; - 3d30: 4a10 ldr r2, [pc, #64] ; (3d74 ) - 3d32: 61c2 str r2, [r0, #28] + 3d90: 4a10 ldr r2, [pc, #64] ; (3dd4 ) + 3d92: 61c2 str r2, [r0, #28] ctx->state[6] = 0x1F83D9AB; - 3d34: 4a10 ldr r2, [pc, #64] ; (3d78 ) - 3d36: 6202 str r2, [r0, #32] + 3d94: 4a10 ldr r2, [pc, #64] ; (3dd8 ) + 3d96: 6202 str r2, [r0, #32] ctx->state[7] = 0x5BE0CD19; - 3d38: f102 5274 add.w r2, r2, #1023410176 ; 0x3d000000 - 3d3c: f5a2 0223 sub.w r2, r2, #10682368 ; 0xa30000 - 3d40: f6a2 4292 subw r2, r2, #3218 ; 0xc92 - 3d44: 6242 str r2, [r0, #36] ; 0x24 - 3d46: e7e6 b.n 3d16 - 3d48: c1059ed8 .word 0xc1059ed8 - 3d4c: 367cd507 .word 0x367cd507 - 3d50: f70e5939 .word 0xf70e5939 - 3d54: ffc00b31 .word 0xffc00b31 - 3d58: 64f98fa7 .word 0x64f98fa7 - 3d5c: befa4fa4 .word 0xbefa4fa4 - 3d60: 6a09e667 .word 0x6a09e667 - 3d64: bb67ae85 .word 0xbb67ae85 - 3d68: 3c6ef372 .word 0x3c6ef372 - 3d6c: a54ff53a .word 0xa54ff53a - 3d70: 510e527f .word 0x510e527f - 3d74: 9b05688c .word 0x9b05688c - 3d78: 1f83d9ab .word 0x1f83d9ab - -00003d7c : + 3d98: f102 5274 add.w r2, r2, #1023410176 ; 0x3d000000 + 3d9c: f5a2 0223 sub.w r2, r2, #10682368 ; 0xa30000 + 3da0: f6a2 4292 subw r2, r2, #3218 ; 0xc92 + 3da4: 6242 str r2, [r0, #36] ; 0x24 + 3da6: e7e6 b.n 3d76 + 3da8: c1059ed8 .word 0xc1059ed8 + 3dac: 367cd507 .word 0x367cd507 + 3db0: f70e5939 .word 0xf70e5939 + 3db4: ffc00b31 .word 0xffc00b31 + 3db8: 64f98fa7 .word 0x64f98fa7 + 3dbc: befa4fa4 .word 0xbefa4fa4 + 3dc0: 6a09e667 .word 0x6a09e667 + 3dc4: bb67ae85 .word 0xbb67ae85 + 3dc8: 3c6ef372 .word 0x3c6ef372 + 3dcc: a54ff53a .word 0xa54ff53a + 3dd0: 510e527f .word 0x510e527f + 3dd4: 9b05688c .word 0x9b05688c + 3dd8: 1f83d9ab .word 0x1f83d9ab + +00003ddc : d += temp1; h = temp1 + temp2; \ } int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] ) { - 3d7c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 3d80: b0c8 sub sp, #288 ; 0x120 + 3ddc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 3de0: b0c8 sub sp, #288 ; 0x120 uint32_t temp1, temp2, W[64]; uint32_t A[8]; unsigned int i; for( i = 0; i < 8; i++ ) - 3d82: 2300 movs r3, #0 - 3d84: e005 b.n 3d92 + 3de2: 2300 movs r3, #0 + 3de4: e005 b.n 3df2 A[i] = ctx->state[i]; - 3d86: 1c9a adds r2, r3, #2 - 3d88: f850 2022 ldr.w r2, [r0, r2, lsl #2] - 3d8c: f84d 2023 str.w r2, [sp, r3, lsl #2] + 3de6: 1c9a adds r2, r3, #2 + 3de8: f850 2022 ldr.w r2, [r0, r2, lsl #2] + 3dec: f84d 2023 str.w r2, [sp, r3, lsl #2] for( i = 0; i < 8; i++ ) - 3d90: 3301 adds r3, #1 - 3d92: 2b07 cmp r3, #7 - 3d94: d9f7 bls.n 3d86 + 3df0: 3301 adds r3, #1 + 3df2: 2b07 cmp r3, #7 + 3df4: d9f7 bls.n 3de6 #if defined(MBEDTLS_SHA256_SMALLER) for( i = 0; i < 64; i++ ) - 3d96: 2200 movs r2, #0 - 3d98: e04b b.n 3e32 + 3df6: 2200 movs r2, #0 + 3df8: e04b b.n 3e92 { if( i < 16 ) GET_UINT32_BE( W[i], data, 4 * i ); - 3d9a: f811 5022 ldrb.w r5, [r1, r2, lsl #2] - 3d9e: eb01 0482 add.w r4, r1, r2, lsl #2 - 3da2: 7863 ldrb r3, [r4, #1] - 3da4: 041b lsls r3, r3, #16 - 3da6: ea43 6305 orr.w r3, r3, r5, lsl #24 - 3daa: 78a5 ldrb r5, [r4, #2] - 3dac: ea43 2305 orr.w r3, r3, r5, lsl #8 - 3db0: 78e4 ldrb r4, [r4, #3] - 3db2: 4323 orrs r3, r4 - 3db4: ac08 add r4, sp, #32 - 3db6: f844 3022 str.w r3, [r4, r2, lsl #2] + 3dfa: f811 5022 ldrb.w r5, [r1, r2, lsl #2] + 3dfe: eb01 0482 add.w r4, r1, r2, lsl #2 + 3e02: 7863 ldrb r3, [r4, #1] + 3e04: 041b lsls r3, r3, #16 + 3e06: ea43 6305 orr.w r3, r3, r5, lsl #24 + 3e0a: 78a5 ldrb r5, [r4, #2] + 3e0c: ea43 2305 orr.w r3, r3, r5, lsl #8 + 3e10: 78e4 ldrb r4, [r4, #3] + 3e12: 4323 orrs r3, r4 + 3e14: ac08 add r4, sp, #32 + 3e16: f844 3022 str.w r3, [r4, r2, lsl #2] else R( i ); P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i], K[i] ); - 3dba: 9b07 ldr r3, [sp, #28] - 3dbc: 9c04 ldr r4, [sp, #16] - 3dbe: ea4f 25f4 mov.w r5, r4, ror #11 - 3dc2: ea85 15b4 eor.w r5, r5, r4, ror #6 - 3dc6: ea85 6574 eor.w r5, r5, r4, ror #25 - 3dca: 442b add r3, r5 - 3dcc: 9e06 ldr r6, [sp, #24] - 3dce: 9f05 ldr r7, [sp, #20] - 3dd0: ea86 0507 eor.w r5, r6, r7 - 3dd4: 4025 ands r5, r4 - 3dd6: 4075 eors r5, r6 - 3dd8: 442b add r3, r5 - 3dda: 4d31 ldr r5, [pc, #196] ; (3ea0 ) - 3ddc: f855 5022 ldr.w r5, [r5, r2, lsl #2] - 3de0: 442b add r3, r5 - 3de2: ad08 add r5, sp, #32 - 3de4: f855 5022 ldr.w r5, [r5, r2, lsl #2] - 3de8: 442b add r3, r5 - 3dea: f8dd e000 ldr.w lr, [sp] - 3dee: ea4f 3c7e mov.w ip, lr, ror #13 - 3df2: ea8c 0cbe eor.w ip, ip, lr, ror #2 - 3df6: ea8c 5cbe eor.w ip, ip, lr, ror #22 - 3dfa: f8dd 8004 ldr.w r8, [sp, #4] - 3dfe: ea0e 0508 and.w r5, lr, r8 - 3e02: f8dd 9008 ldr.w r9, [sp, #8] - 3e06: ea4e 0a08 orr.w sl, lr, r8 - 3e0a: ea09 0a0a and.w sl, r9, sl - 3e0e: ea45 050a orr.w r5, r5, sl - 3e12: 44ac add ip, r5 - 3e14: 9d03 ldr r5, [sp, #12] - 3e16: 441d add r5, r3 - 3e18: 4463 add r3, ip + 3e1a: 9b07 ldr r3, [sp, #28] + 3e1c: 9c04 ldr r4, [sp, #16] + 3e1e: ea4f 25f4 mov.w r5, r4, ror #11 + 3e22: ea85 15b4 eor.w r5, r5, r4, ror #6 + 3e26: ea85 6574 eor.w r5, r5, r4, ror #25 + 3e2a: 442b add r3, r5 + 3e2c: 9e06 ldr r6, [sp, #24] + 3e2e: 9f05 ldr r7, [sp, #20] + 3e30: ea86 0507 eor.w r5, r6, r7 + 3e34: 4025 ands r5, r4 + 3e36: 4075 eors r5, r6 + 3e38: 442b add r3, r5 + 3e3a: 4d31 ldr r5, [pc, #196] ; (3f00 ) + 3e3c: f855 5022 ldr.w r5, [r5, r2, lsl #2] + 3e40: 442b add r3, r5 + 3e42: ad08 add r5, sp, #32 + 3e44: f855 5022 ldr.w r5, [r5, r2, lsl #2] + 3e48: 442b add r3, r5 + 3e4a: f8dd e000 ldr.w lr, [sp] + 3e4e: ea4f 3c7e mov.w ip, lr, ror #13 + 3e52: ea8c 0cbe eor.w ip, ip, lr, ror #2 + 3e56: ea8c 5cbe eor.w ip, ip, lr, ror #22 + 3e5a: f8dd 8004 ldr.w r8, [sp, #4] + 3e5e: ea0e 0508 and.w r5, lr, r8 + 3e62: f8dd 9008 ldr.w r9, [sp, #8] + 3e66: ea4e 0a08 orr.w sl, lr, r8 + 3e6a: ea09 0a0a and.w sl, r9, sl + 3e6e: ea45 050a orr.w r5, r5, sl + 3e72: 44ac add ip, r5 + 3e74: 9d03 ldr r5, [sp, #12] + 3e76: 441d add r5, r3 + 3e78: 4463 add r3, ip temp1 = A[7]; A[7] = A[6]; A[6] = A[5]; A[5] = A[4]; A[4] = A[3]; - 3e1a: 9607 str r6, [sp, #28] - 3e1c: 9706 str r7, [sp, #24] - 3e1e: 9405 str r4, [sp, #20] - 3e20: 9504 str r5, [sp, #16] + 3e7a: 9607 str r6, [sp, #28] + 3e7c: 9706 str r7, [sp, #24] + 3e7e: 9405 str r4, [sp, #20] + 3e80: 9504 str r5, [sp, #16] A[3] = A[2]; A[2] = A[1]; A[1] = A[0]; A[0] = temp1; - 3e22: f8cd 900c str.w r9, [sp, #12] - 3e26: f8cd 8008 str.w r8, [sp, #8] - 3e2a: f8cd e004 str.w lr, [sp, #4] - 3e2e: 9300 str r3, [sp, #0] + 3e82: f8cd 900c str.w r9, [sp, #12] + 3e86: f8cd 8008 str.w r8, [sp, #8] + 3e8a: f8cd e004 str.w lr, [sp, #4] + 3e8e: 9300 str r3, [sp, #0] for( i = 0; i < 64; i++ ) - 3e30: 3201 adds r2, #1 - 3e32: 2a3f cmp r2, #63 ; 0x3f - 3e34: d822 bhi.n 3e7c + 3e90: 3201 adds r2, #1 + 3e92: 2a3f cmp r2, #63 ; 0x3f + 3e94: d822 bhi.n 3edc if( i < 16 ) - 3e36: 2a0f cmp r2, #15 - 3e38: d9af bls.n 3d9a + 3e96: 2a0f cmp r2, #15 + 3e98: d9af bls.n 3dfa R( i ); - 3e3a: 1e93 subs r3, r2, #2 - 3e3c: ac08 add r4, sp, #32 - 3e3e: f854 5023 ldr.w r5, [r4, r3, lsl #2] - 3e42: ea4f 43f5 mov.w r3, r5, ror #19 - 3e46: ea83 4375 eor.w r3, r3, r5, ror #17 - 3e4a: ea83 2395 eor.w r3, r3, r5, lsr #10 - 3e4e: 1fd5 subs r5, r2, #7 - 3e50: f854 5025 ldr.w r5, [r4, r5, lsl #2] - 3e54: 442b add r3, r5 - 3e56: f1a2 050f sub.w r5, r2, #15 - 3e5a: f854 6025 ldr.w r6, [r4, r5, lsl #2] - 3e5e: ea4f 45b6 mov.w r5, r6, ror #18 - 3e62: ea85 15f6 eor.w r5, r5, r6, ror #7 - 3e66: ea85 05d6 eor.w r5, r5, r6, lsr #3 - 3e6a: 442b add r3, r5 - 3e6c: f1a2 0510 sub.w r5, r2, #16 - 3e70: f854 5025 ldr.w r5, [r4, r5, lsl #2] - 3e74: 442b add r3, r5 - 3e76: f844 3022 str.w r3, [r4, r2, lsl #2] - 3e7a: e79e b.n 3dba + 3e9a: 1e93 subs r3, r2, #2 + 3e9c: ac08 add r4, sp, #32 + 3e9e: f854 5023 ldr.w r5, [r4, r3, lsl #2] + 3ea2: ea4f 43f5 mov.w r3, r5, ror #19 + 3ea6: ea83 4375 eor.w r3, r3, r5, ror #17 + 3eaa: ea83 2395 eor.w r3, r3, r5, lsr #10 + 3eae: 1fd5 subs r5, r2, #7 + 3eb0: f854 5025 ldr.w r5, [r4, r5, lsl #2] + 3eb4: 442b add r3, r5 + 3eb6: f1a2 050f sub.w r5, r2, #15 + 3eba: f854 6025 ldr.w r6, [r4, r5, lsl #2] + 3ebe: ea4f 45b6 mov.w r5, r6, ror #18 + 3ec2: ea85 15f6 eor.w r5, r5, r6, ror #7 + 3ec6: ea85 05d6 eor.w r5, r5, r6, lsr #3 + 3eca: 442b add r3, r5 + 3ecc: f1a2 0510 sub.w r5, r2, #16 + 3ed0: f854 5025 ldr.w r5, [r4, r5, lsl #2] + 3ed4: 442b add r3, r5 + 3ed6: f844 3022 str.w r3, [r4, r2, lsl #2] + 3eda: e79e b.n 3e1a P( A[2], A[3], A[4], A[5], A[6], A[7], A[0], A[1], R(i+6), K[i+6] ); P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], R(i+7), K[i+7] ); } #endif /* MBEDTLS_SHA256_SMALLER */ for( i = 0; i < 8; i++ ) - 3e7c: 2300 movs r3, #0 - 3e7e: e008 b.n 3e92 + 3edc: 2300 movs r3, #0 + 3ede: e008 b.n 3ef2 ctx->state[i] += A[i]; - 3e80: f85d 4023 ldr.w r4, [sp, r3, lsl #2] - 3e84: 1c99 adds r1, r3, #2 - 3e86: f850 2021 ldr.w r2, [r0, r1, lsl #2] - 3e8a: 4422 add r2, r4 - 3e8c: f840 2021 str.w r2, [r0, r1, lsl #2] + 3ee0: f85d 4023 ldr.w r4, [sp, r3, lsl #2] + 3ee4: 1c99 adds r1, r3, #2 + 3ee6: f850 2021 ldr.w r2, [r0, r1, lsl #2] + 3eea: 4422 add r2, r4 + 3eec: f840 2021 str.w r2, [r0, r1, lsl #2] for( i = 0; i < 8; i++ ) - 3e90: 3301 adds r3, #1 - 3e92: 2b07 cmp r3, #7 - 3e94: d9f4 bls.n 3e80 + 3ef0: 3301 adds r3, #1 + 3ef2: 2b07 cmp r3, #7 + 3ef4: d9f4 bls.n 3ee0 return( 0 ); } - 3e96: 2000 movs r0, #0 - 3e98: b048 add sp, #288 ; 0x120 - 3e9a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 3e9e: bf00 nop - 3ea0: 000056f8 .word 0x000056f8 + 3ef6: 2000 movs r0, #0 + 3ef8: b048 add sp, #288 ; 0x120 + 3efa: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 3efe: bf00 nop + 3f00: 000057a0 .word 0x000057a0 -00003ea4 : +00003f04 : * SHA-256 process buffer */ int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx, const unsigned char *input, size_t ilen ) { - 3ea4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} + 3f04: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} int ret; size_t fill; uint32_t left; if( ilen == 0 ) - 3ea8: b3da cbz r2, 3f22 - 3eaa: 4606 mov r6, r0 - 3eac: 460d mov r5, r1 - 3eae: 4614 mov r4, r2 + 3f08: b3da cbz r2, 3f82 + 3f0a: 4606 mov r6, r0 + 3f0c: 460d mov r5, r1 + 3f0e: 4614 mov r4, r2 return( 0 ); left = ctx->total[0] & 0x3F; - 3eb0: 6803 ldr r3, [r0, #0] - 3eb2: f003 073f and.w r7, r3, #63 ; 0x3f + 3f10: 6803 ldr r3, [r0, #0] + 3f12: f003 073f and.w r7, r3, #63 ; 0x3f fill = 64 - left; - 3eb6: f1c7 0840 rsb r8, r7, #64 ; 0x40 + 3f16: f1c7 0840 rsb r8, r7, #64 ; 0x40 ctx->total[0] += (uint32_t) ilen; - 3eba: 4413 add r3, r2 - 3ebc: 6003 str r3, [r0, #0] + 3f1a: 4413 add r3, r2 + 3f1c: 6003 str r3, [r0, #0] ctx->total[0] &= 0xFFFFFFFF; if( ctx->total[0] < (uint32_t) ilen ) - 3ebe: 4293 cmp r3, r2 - 3ec0: d202 bcs.n 3ec8 + 3f1e: 4293 cmp r3, r2 + 3f20: d202 bcs.n 3f28 ctx->total[1]++; - 3ec2: 6843 ldr r3, [r0, #4] - 3ec4: 3301 adds r3, #1 - 3ec6: 6043 str r3, [r0, #4] + 3f22: 6843 ldr r3, [r0, #4] + 3f24: 3301 adds r3, #1 + 3f26: 6043 str r3, [r0, #4] if( left && ilen >= fill ) - 3ec8: b10f cbz r7, 3ece - 3eca: 4544 cmp r4, r8 - 3ecc: d20a bcs.n 3ee4 + 3f28: b10f cbz r7, 3f2e + 3f2a: 4544 cmp r4, r8 + 3f2c: d20a bcs.n 3f44 input += fill; ilen -= fill; left = 0; } while( ilen >= 64 ) - 3ece: 2c3f cmp r4, #63 ; 0x3f - 3ed0: d91b bls.n 3f0a + 3f2e: 2c3f cmp r4, #63 ; 0x3f + 3f30: d91b bls.n 3f6a { if( ( ret = mbedtls_internal_sha256_process( ctx, input ) ) != 0 ) - 3ed2: 4629 mov r1, r5 - 3ed4: 4630 mov r0, r6 - 3ed6: f7ff ff51 bl 3d7c - 3eda: 4603 mov r3, r0 - 3edc: bb10 cbnz r0, 3f24 + 3f32: 4629 mov r1, r5 + 3f34: 4630 mov r0, r6 + 3f36: f7ff ff51 bl 3ddc + 3f3a: 4603 mov r3, r0 + 3f3c: bb10 cbnz r0, 3f84 return( ret ); input += 64; - 3ede: 3540 adds r5, #64 ; 0x40 + 3f3e: 3540 adds r5, #64 ; 0x40 ilen -= 64; - 3ee0: 3c40 subs r4, #64 ; 0x40 - 3ee2: e7f4 b.n 3ece + 3f40: 3c40 subs r4, #64 ; 0x40 + 3f42: e7f4 b.n 3f2e memcpy( (void *) (ctx->buffer + left), input, fill ); - 3ee4: f106 0928 add.w r9, r6, #40 ; 0x28 - 3ee8: 4642 mov r2, r8 - 3eea: 4629 mov r1, r5 - 3eec: eb09 0007 add.w r0, r9, r7 - 3ef0: f7fd ff63 bl 1dba + 3f44: f106 0928 add.w r9, r6, #40 ; 0x28 + 3f48: 4642 mov r2, r8 + 3f4a: 4629 mov r1, r5 + 3f4c: eb09 0007 add.w r0, r9, r7 + 3f50: f7fd ff33 bl 1dba if( ( ret = mbedtls_internal_sha256_process( ctx, ctx->buffer ) ) != 0 ) - 3ef4: 4649 mov r1, r9 - 3ef6: 4630 mov r0, r6 - 3ef8: f7ff ff40 bl 3d7c - 3efc: 4603 mov r3, r0 - 3efe: b988 cbnz r0, 3f24 + 3f54: 4649 mov r1, r9 + 3f56: 4630 mov r0, r6 + 3f58: f7ff ff40 bl 3ddc + 3f5c: 4603 mov r3, r0 + 3f5e: b988 cbnz r0, 3f84 input += fill; - 3f00: 4445 add r5, r8 + 3f60: 4445 add r5, r8 ilen -= fill; - 3f02: eba4 0408 sub.w r4, r4, r8 + 3f62: eba4 0408 sub.w r4, r4, r8 left = 0; - 3f06: 2700 movs r7, #0 - 3f08: e7e1 b.n 3ece + 3f66: 2700 movs r7, #0 + 3f68: e7e1 b.n 3f2e } if( ilen > 0 ) - 3f0a: b90c cbnz r4, 3f10 + 3f6a: b90c cbnz r4, 3f70 memcpy( (void *) (ctx->buffer + left), input, ilen ); return( 0 ); - 3f0c: 2300 movs r3, #0 - 3f0e: e009 b.n 3f24 + 3f6c: 2300 movs r3, #0 + 3f6e: e009 b.n 3f84 memcpy( (void *) (ctx->buffer + left), input, ilen ); - 3f10: f106 0028 add.w r0, r6, #40 ; 0x28 - 3f14: 4622 mov r2, r4 - 3f16: 4629 mov r1, r5 - 3f18: 4438 add r0, r7 - 3f1a: f7fd ff4e bl 1dba + 3f70: f106 0028 add.w r0, r6, #40 ; 0x28 + 3f74: 4622 mov r2, r4 + 3f76: 4629 mov r1, r5 + 3f78: 4438 add r0, r7 + 3f7a: f7fd ff1e bl 1dba return( 0 ); - 3f1e: 2300 movs r3, #0 - 3f20: e000 b.n 3f24 + 3f7e: 2300 movs r3, #0 + 3f80: e000 b.n 3f84 return( 0 ); - 3f22: 2300 movs r3, #0 + 3f82: 2300 movs r3, #0 } - 3f24: 4618 mov r0, r3 - 3f26: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} + 3f84: 4618 mov r0, r3 + 3f86: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} -00003f2a : +00003f8a : /* * SHA-256 final digest */ int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx, unsigned char output[32] ) { - 3f2a: b570 push {r4, r5, r6, lr} - 3f2c: 4604 mov r4, r0 - 3f2e: 460d mov r5, r1 + 3f8a: b570 push {r4, r5, r6, lr} + 3f8c: 4604 mov r4, r0 + 3f8e: 460d mov r5, r1 uint32_t high, low; /* * Add padding: 0x80 then 0x00 until 8 bytes remain for the length */ used = ctx->total[0] & 0x3F; - 3f30: 6803 ldr r3, [r0, #0] - 3f32: f003 033f and.w r3, r3, #63 ; 0x3f + 3f90: 6803 ldr r3, [r0, #0] + 3f92: f003 033f and.w r3, r3, #63 ; 0x3f ctx->buffer[used++] = 0x80; - 3f36: 1c58 adds r0, r3, #1 - 3f38: 4423 add r3, r4 - 3f3a: 2280 movs r2, #128 ; 0x80 - 3f3c: f883 2028 strb.w r2, [r3, #40] ; 0x28 + 3f96: 1c58 adds r0, r3, #1 + 3f98: 4423 add r3, r4 + 3f9a: 2280 movs r2, #128 ; 0x80 + 3f9c: f883 2028 strb.w r2, [r3, #40] ; 0x28 if( used <= 56 ) - 3f40: 2838 cmp r0, #56 ; 0x38 - 3f42: d87b bhi.n 403c + 3fa0: 2838 cmp r0, #56 ; 0x38 + 3fa2: d87b bhi.n 409c { /* Enough room for padding + length in current block */ memset( ctx->buffer + used, 0, 56 - used ); - 3f44: f104 0328 add.w r3, r4, #40 ; 0x28 - 3f48: f1c0 0238 rsb r2, r0, #56 ; 0x38 - 3f4c: 2100 movs r1, #0 - 3f4e: 4418 add r0, r3 - 3f50: f7fd ff40 bl 1dd4 + 3fa4: f104 0328 add.w r3, r4, #40 ; 0x28 + 3fa8: f1c0 0238 rsb r2, r0, #56 ; 0x38 + 3fac: 2100 movs r1, #0 + 3fae: 4418 add r0, r3 + 3fb0: f7fd ff10 bl 1dd4 } /* * Add message length */ high = ( ctx->total[0] >> 29 ) - 3f54: 6822 ldr r2, [r4, #0] + 3fb4: 6822 ldr r2, [r4, #0] | ( ctx->total[1] << 3 ); - 3f56: 6863 ldr r3, [r4, #4] - 3f58: 00db lsls r3, r3, #3 + 3fb6: 6863 ldr r3, [r4, #4] + 3fb8: 00db lsls r3, r3, #3 high = ( ctx->total[0] >> 29 ) - 3f5a: ea43 7352 orr.w r3, r3, r2, lsr #29 + 3fba: ea43 7352 orr.w r3, r3, r2, lsr #29 low = ( ctx->total[0] << 3 ); - 3f5e: 00d2 lsls r2, r2, #3 + 3fbe: 00d2 lsls r2, r2, #3 PUT_UINT32_BE( high, ctx->buffer, 56 ); - 3f60: 0e19 lsrs r1, r3, #24 - 3f62: f884 1060 strb.w r1, [r4, #96] ; 0x60 - 3f66: f3c3 4107 ubfx r1, r3, #16, #8 - 3f6a: f884 1061 strb.w r1, [r4, #97] ; 0x61 - 3f6e: f3c3 2107 ubfx r1, r3, #8, #8 - 3f72: f884 1062 strb.w r1, [r4, #98] ; 0x62 - 3f76: f884 3063 strb.w r3, [r4, #99] ; 0x63 + 3fc0: 0e19 lsrs r1, r3, #24 + 3fc2: f884 1060 strb.w r1, [r4, #96] ; 0x60 + 3fc6: f3c3 4107 ubfx r1, r3, #16, #8 + 3fca: f884 1061 strb.w r1, [r4, #97] ; 0x61 + 3fce: f3c3 2107 ubfx r1, r3, #8, #8 + 3fd2: f884 1062 strb.w r1, [r4, #98] ; 0x62 + 3fd6: f884 3063 strb.w r3, [r4, #99] ; 0x63 PUT_UINT32_BE( low, ctx->buffer, 60 ); - 3f7a: 0e13 lsrs r3, r2, #24 - 3f7c: f884 3064 strb.w r3, [r4, #100] ; 0x64 - 3f80: f3c2 4307 ubfx r3, r2, #16, #8 - 3f84: f884 3065 strb.w r3, [r4, #101] ; 0x65 - 3f88: f3c2 2307 ubfx r3, r2, #8, #8 - 3f8c: f884 3066 strb.w r3, [r4, #102] ; 0x66 - 3f90: f884 2067 strb.w r2, [r4, #103] ; 0x67 + 3fda: 0e13 lsrs r3, r2, #24 + 3fdc: f884 3064 strb.w r3, [r4, #100] ; 0x64 + 3fe0: f3c2 4307 ubfx r3, r2, #16, #8 + 3fe4: f884 3065 strb.w r3, [r4, #101] ; 0x65 + 3fe8: f3c2 2307 ubfx r3, r2, #8, #8 + 3fec: f884 3066 strb.w r3, [r4, #102] ; 0x66 + 3ff0: f884 2067 strb.w r2, [r4, #103] ; 0x67 if( ( ret = mbedtls_internal_sha256_process( ctx, ctx->buffer ) ) != 0 ) - 3f94: f104 0128 add.w r1, r4, #40 ; 0x28 - 3f98: 4620 mov r0, r4 - 3f9a: f7ff feef bl 3d7c - 3f9e: 4603 mov r3, r0 - 3fa0: 2800 cmp r0, #0 - 3fa2: d159 bne.n 4058 + 3ff4: f104 0128 add.w r1, r4, #40 ; 0x28 + 3ff8: 4620 mov r0, r4 + 3ffa: f7ff feef bl 3ddc + 3ffe: 4603 mov r3, r0 + 4000: 2800 cmp r0, #0 + 4002: d159 bne.n 40b8 return( ret ); /* * Output final state */ PUT_UINT32_BE( ctx->state[0], output, 0 ); - 3fa4: 7ae2 ldrb r2, [r4, #11] - 3fa6: 702a strb r2, [r5, #0] - 3fa8: 7aa2 ldrb r2, [r4, #10] - 3faa: 706a strb r2, [r5, #1] - 3fac: 7a62 ldrb r2, [r4, #9] - 3fae: 70aa strb r2, [r5, #2] - 3fb0: 7a22 ldrb r2, [r4, #8] - 3fb2: 70ea strb r2, [r5, #3] + 4004: 7ae2 ldrb r2, [r4, #11] + 4006: 702a strb r2, [r5, #0] + 4008: 7aa2 ldrb r2, [r4, #10] + 400a: 706a strb r2, [r5, #1] + 400c: 7a62 ldrb r2, [r4, #9] + 400e: 70aa strb r2, [r5, #2] + 4010: 7a22 ldrb r2, [r4, #8] + 4012: 70ea strb r2, [r5, #3] PUT_UINT32_BE( ctx->state[1], output, 4 ); - 3fb4: 7be2 ldrb r2, [r4, #15] - 3fb6: 712a strb r2, [r5, #4] - 3fb8: 7ba2 ldrb r2, [r4, #14] - 3fba: 716a strb r2, [r5, #5] - 3fbc: 7b62 ldrb r2, [r4, #13] - 3fbe: 71aa strb r2, [r5, #6] - 3fc0: 7b22 ldrb r2, [r4, #12] - 3fc2: 71ea strb r2, [r5, #7] + 4014: 7be2 ldrb r2, [r4, #15] + 4016: 712a strb r2, [r5, #4] + 4018: 7ba2 ldrb r2, [r4, #14] + 401a: 716a strb r2, [r5, #5] + 401c: 7b62 ldrb r2, [r4, #13] + 401e: 71aa strb r2, [r5, #6] + 4020: 7b22 ldrb r2, [r4, #12] + 4022: 71ea strb r2, [r5, #7] PUT_UINT32_BE( ctx->state[2], output, 8 ); - 3fc4: 7ce2 ldrb r2, [r4, #19] - 3fc6: 722a strb r2, [r5, #8] - 3fc8: 7ca2 ldrb r2, [r4, #18] - 3fca: 726a strb r2, [r5, #9] - 3fcc: 7c62 ldrb r2, [r4, #17] - 3fce: 72aa strb r2, [r5, #10] - 3fd0: 7c22 ldrb r2, [r4, #16] - 3fd2: 72ea strb r2, [r5, #11] + 4024: 7ce2 ldrb r2, [r4, #19] + 4026: 722a strb r2, [r5, #8] + 4028: 7ca2 ldrb r2, [r4, #18] + 402a: 726a strb r2, [r5, #9] + 402c: 7c62 ldrb r2, [r4, #17] + 402e: 72aa strb r2, [r5, #10] + 4030: 7c22 ldrb r2, [r4, #16] + 4032: 72ea strb r2, [r5, #11] PUT_UINT32_BE( ctx->state[3], output, 12 ); - 3fd4: 7de2 ldrb r2, [r4, #23] - 3fd6: 732a strb r2, [r5, #12] - 3fd8: 7da2 ldrb r2, [r4, #22] - 3fda: 736a strb r2, [r5, #13] - 3fdc: 7d62 ldrb r2, [r4, #21] - 3fde: 73aa strb r2, [r5, #14] - 3fe0: 7d22 ldrb r2, [r4, #20] - 3fe2: 73ea strb r2, [r5, #15] + 4034: 7de2 ldrb r2, [r4, #23] + 4036: 732a strb r2, [r5, #12] + 4038: 7da2 ldrb r2, [r4, #22] + 403a: 736a strb r2, [r5, #13] + 403c: 7d62 ldrb r2, [r4, #21] + 403e: 73aa strb r2, [r5, #14] + 4040: 7d22 ldrb r2, [r4, #20] + 4042: 73ea strb r2, [r5, #15] PUT_UINT32_BE( ctx->state[4], output, 16 ); - 3fe4: 7ee2 ldrb r2, [r4, #27] - 3fe6: 742a strb r2, [r5, #16] - 3fe8: 7ea2 ldrb r2, [r4, #26] - 3fea: 746a strb r2, [r5, #17] - 3fec: 7e62 ldrb r2, [r4, #25] - 3fee: 74aa strb r2, [r5, #18] - 3ff0: 7e22 ldrb r2, [r4, #24] - 3ff2: 74ea strb r2, [r5, #19] + 4044: 7ee2 ldrb r2, [r4, #27] + 4046: 742a strb r2, [r5, #16] + 4048: 7ea2 ldrb r2, [r4, #26] + 404a: 746a strb r2, [r5, #17] + 404c: 7e62 ldrb r2, [r4, #25] + 404e: 74aa strb r2, [r5, #18] + 4050: 7e22 ldrb r2, [r4, #24] + 4052: 74ea strb r2, [r5, #19] PUT_UINT32_BE( ctx->state[5], output, 20 ); - 3ff4: 7fe2 ldrb r2, [r4, #31] - 3ff6: 752a strb r2, [r5, #20] - 3ff8: 7fa2 ldrb r2, [r4, #30] - 3ffa: 756a strb r2, [r5, #21] - 3ffc: 7f62 ldrb r2, [r4, #29] - 3ffe: 75aa strb r2, [r5, #22] - 4000: 7f22 ldrb r2, [r4, #28] - 4002: 75ea strb r2, [r5, #23] + 4054: 7fe2 ldrb r2, [r4, #31] + 4056: 752a strb r2, [r5, #20] + 4058: 7fa2 ldrb r2, [r4, #30] + 405a: 756a strb r2, [r5, #21] + 405c: 7f62 ldrb r2, [r4, #29] + 405e: 75aa strb r2, [r5, #22] + 4060: 7f22 ldrb r2, [r4, #28] + 4062: 75ea strb r2, [r5, #23] PUT_UINT32_BE( ctx->state[6], output, 24 ); - 4004: f894 2023 ldrb.w r2, [r4, #35] ; 0x23 - 4008: 762a strb r2, [r5, #24] - 400a: f894 2022 ldrb.w r2, [r4, #34] ; 0x22 - 400e: 766a strb r2, [r5, #25] - 4010: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 - 4014: 76aa strb r2, [r5, #26] - 4016: f894 2020 ldrb.w r2, [r4, #32] - 401a: 76ea strb r2, [r5, #27] + 4064: f894 2023 ldrb.w r2, [r4, #35] ; 0x23 + 4068: 762a strb r2, [r5, #24] + 406a: f894 2022 ldrb.w r2, [r4, #34] ; 0x22 + 406e: 766a strb r2, [r5, #25] + 4070: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 + 4074: 76aa strb r2, [r5, #26] + 4076: f894 2020 ldrb.w r2, [r4, #32] + 407a: 76ea strb r2, [r5, #27] if( ctx->is224 == 0 ) - 401c: 6ea2 ldr r2, [r4, #104] ; 0x68 - 401e: b9da cbnz r2, 4058 + 407c: 6ea2 ldr r2, [r4, #104] ; 0x68 + 407e: b9da cbnz r2, 40b8 PUT_UINT32_BE( ctx->state[7], output, 28 ); - 4020: f894 3027 ldrb.w r3, [r4, #39] ; 0x27 - 4024: 772b strb r3, [r5, #28] - 4026: f894 3026 ldrb.w r3, [r4, #38] ; 0x26 - 402a: 776b strb r3, [r5, #29] - 402c: f894 3025 ldrb.w r3, [r4, #37] ; 0x25 - 4030: 77ab strb r3, [r5, #30] - 4032: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 - 4036: 77eb strb r3, [r5, #31] + 4080: f894 3027 ldrb.w r3, [r4, #39] ; 0x27 + 4084: 772b strb r3, [r5, #28] + 4086: f894 3026 ldrb.w r3, [r4, #38] ; 0x26 + 408a: 776b strb r3, [r5, #29] + 408c: f894 3025 ldrb.w r3, [r4, #37] ; 0x25 + 4090: 77ab strb r3, [r5, #30] + 4092: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 + 4096: 77eb strb r3, [r5, #31] return( 0 ); - 4038: 4613 mov r3, r2 - 403a: e00d b.n 4058 + 4098: 4613 mov r3, r2 + 409a: e00d b.n 40b8 memset( ctx->buffer + used, 0, 64 - used ); - 403c: f104 0628 add.w r6, r4, #40 ; 0x28 - 4040: f1c0 0240 rsb r2, r0, #64 ; 0x40 - 4044: 2100 movs r1, #0 - 4046: 4430 add r0, r6 - 4048: f7fd fec4 bl 1dd4 + 409c: f104 0628 add.w r6, r4, #40 ; 0x28 + 40a0: f1c0 0240 rsb r2, r0, #64 ; 0x40 + 40a4: 2100 movs r1, #0 + 40a6: 4430 add r0, r6 + 40a8: f7fd fe94 bl 1dd4 if( ( ret = mbedtls_internal_sha256_process( ctx, ctx->buffer ) ) != 0 ) - 404c: 4631 mov r1, r6 - 404e: 4620 mov r0, r4 - 4050: f7ff fe94 bl 3d7c - 4054: 4603 mov r3, r0 - 4056: b108 cbz r0, 405c -} - 4058: 4618 mov r0, r3 - 405a: bd70 pop {r4, r5, r6, pc} + 40ac: 4631 mov r1, r6 + 40ae: 4620 mov r0, r4 + 40b0: f7ff fe94 bl 3ddc + 40b4: 4603 mov r3, r0 + 40b6: b108 cbz r0, 40bc +} + 40b8: 4618 mov r0, r3 + 40ba: bd70 pop {r4, r5, r6, pc} memset( ctx->buffer, 0, 56 ); - 405c: 2238 movs r2, #56 ; 0x38 - 405e: 2100 movs r1, #0 - 4060: 4630 mov r0, r6 - 4062: f7fd feb7 bl 1dd4 - 4066: e775 b.n 3f54 + 40bc: 2238 movs r2, #56 ; 0x38 + 40be: 2100 movs r1, #0 + 40c0: 4630 mov r0, r6 + 40c2: f7fd fe87 bl 1dd4 + 40c6: e775 b.n 3fb4 -00004068 : +000040c8 : } static int hal_flash_check_addr(const struct hal_flash *hf, uint32_t addr) { if (addr < hf->hf_base_addr || addr > hf->hf_base_addr + hf->hf_size) { - 4068: 6843 ldr r3, [r0, #4] - 406a: 428b cmp r3, r1 - 406c: d808 bhi.n 4080 - 406e: 6882 ldr r2, [r0, #8] - 4070: 4413 add r3, r2 - 4072: 428b cmp r3, r1 - 4074: d301 bcc.n 407a + 40c8: 6843 ldr r3, [r0, #4] + 40ca: 428b cmp r3, r1 + 40cc: d808 bhi.n 40e0 + 40ce: 6882 ldr r2, [r0, #8] + 40d0: 4413 add r3, r2 + 40d2: 428b cmp r3, r1 + 40d4: d301 bcc.n 40da return SYS_EINVAL; } return 0; - 4076: 2000 movs r0, #0 + 40d6: 2000 movs r0, #0 } - 4078: 4770 bx lr + 40d8: 4770 bx lr return SYS_EINVAL; - 407a: f06f 0001 mvn.w r0, #1 - 407e: 4770 bx lr - 4080: f06f 0001 mvn.w r0, #1 - 4084: 4770 bx lr + 40da: f06f 0001 mvn.w r0, #1 + 40de: 4770 bx lr + 40e0: f06f 0001 mvn.w r0, #1 + 40e4: 4770 bx lr -00004086 : +000040e6 : { - 4086: b538 push {r3, r4, r5, lr} + 40e6: b538 push {r3, r4, r5, lr} int rc = 0; - 4088: 2500 movs r5, #0 + 40e8: 2500 movs r5, #0 for (i = 0; ; i++) { - 408a: 462c mov r4, r5 - 408c: e001 b.n 4092 - 408e: 3401 adds r4, #1 - 4090: b2e4 uxtb r4, r4 + 40ea: 462c mov r4, r5 + 40ec: e001 b.n 40f2 + 40ee: 3401 adds r4, #1 + 40f0: b2e4 uxtb r4, r4 hf = hal_bsp_flash_dev(i); - 4092: 4620 mov r0, r4 - 4094: f7fc fae0 bl 658 + 40f2: 4620 mov r0, r4 + 40f4: f7fc fab0 bl 658 if (!hf) { - 4098: b138 cbz r0, 40aa + 40f8: b138 cbz r0, 410a if (hf->hf_itf->hff_init(hf)) { - 409a: 6802 ldr r2, [r0, #0] - 409c: 6952 ldr r2, [r2, #20] - 409e: 4790 blx r2 - 40a0: 2800 cmp r0, #0 - 40a2: d0f4 beq.n 408e + 40fa: 6802 ldr r2, [r0, #0] + 40fc: 6952 ldr r2, [r2, #20] + 40fe: 4790 blx r2 + 4100: 2800 cmp r0, #0 + 4102: d0f4 beq.n 40ee rc = SYS_EIO; - 40a4: f06f 0504 mvn.w r5, #4 - 40a8: e7f1 b.n 408e + 4104: f06f 0504 mvn.w r5, #4 + 4108: e7f1 b.n 40ee } - 40aa: 4628 mov r0, r5 - 40ac: bd38 pop {r3, r4, r5, pc} + 410a: 4628 mov r0, r5 + 410c: bd38 pop {r3, r4, r5, pc} -000040ae : +0000410e : { - 40ae: b508 push {r3, lr} + 410e: b508 push {r3, lr} hf = hal_bsp_flash_dev(flash_id); - 40b0: f7fc fad2 bl 658 + 4110: f7fc faa2 bl 658 if (!hf) { - 40b4: b108 cbz r0, 40ba + 4114: b108 cbz r0, 411a return hf->hf_align; - 40b6: 7c00 ldrb r0, [r0, #16] + 4116: 7c00 ldrb r0, [r0, #16] } - 40b8: bd08 pop {r3, pc} + 4118: bd08 pop {r3, pc} return 1; - 40ba: 2001 movs r0, #1 - 40bc: e7fc b.n 40b8 + 411a: 2001 movs r0, #1 + 411c: e7fc b.n 4118 -000040be : +0000411e : { - 40be: b508 push {r3, lr} + 411e: b508 push {r3, lr} hf = hal_bsp_flash_dev(flash_id); - 40c0: f7fc faca bl 658 + 4120: f7fc fa9a bl 658 if (!hf) { - 40c4: b108 cbz r0, 40ca + 4124: b108 cbz r0, 412a return hf->hf_erased_val; - 40c6: 7d00 ldrb r0, [r0, #20] + 4126: 7d00 ldrb r0, [r0, #20] } - 40c8: bd08 pop {r3, pc} + 4128: bd08 pop {r3, pc} return 1; - 40ca: 2001 movs r0, #1 - 40cc: e7fc b.n 40c8 + 412a: 2001 movs r0, #1 + 412c: e7fc b.n 4128 -000040ce : +0000412e : int hal_flash_read(uint8_t id, uint32_t address, void *dst, uint32_t num_bytes) { - 40ce: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 40d2: 460d mov r5, r1 - 40d4: 4690 mov r8, r2 - 40d6: 461e mov r6, r3 + 412e: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 4132: 460d mov r5, r1 + 4134: 4690 mov r8, r2 + 4136: 461e mov r6, r3 const struct hal_flash *hf; int rc; hf = hal_bsp_flash_dev(id); - 40d8: f7fc fabe bl 658 + 4138: f7fc fa8e bl 658 if (!hf) { - 40dc: b1c0 cbz r0, 4110 - 40de: 4604 mov r4, r0 + 413c: b1c0 cbz r0, 4170 + 413e: 4604 mov r4, r0 return SYS_EINVAL; } if (hal_flash_check_addr(hf, address) || - 40e0: 4629 mov r1, r5 - 40e2: f7ff ffc1 bl 4068 - 40e6: b9b0 cbnz r0, 4116 + 4140: 4629 mov r1, r5 + 4142: f7ff ffc1 bl 40c8 + 4146: b9b0 cbnz r0, 4176 hal_flash_check_addr(hf, address + num_bytes)) { - 40e8: 19a9 adds r1, r5, r6 - 40ea: 4620 mov r0, r4 - 40ec: f7ff ffbc bl 4068 + 4148: 19a9 adds r1, r5, r6 + 414a: 4620 mov r0, r4 + 414c: f7ff ffbc bl 40c8 if (hal_flash_check_addr(hf, address) || - 40f0: b9a0 cbnz r0, 411c + 4150: b9a0 cbnz r0, 417c return SYS_EINVAL; } rc = hf->hf_itf->hff_read(hf, address, dst, num_bytes); - 40f2: 6823 ldr r3, [r4, #0] - 40f4: 681f ldr r7, [r3, #0] - 40f6: 4633 mov r3, r6 - 40f8: 4642 mov r2, r8 - 40fa: 4629 mov r1, r5 - 40fc: 4620 mov r0, r4 - 40fe: 47b8 blx r7 + 4152: 6823 ldr r3, [r4, #0] + 4154: 681f ldr r7, [r3, #0] + 4156: 4633 mov r3, r6 + 4158: 4642 mov r2, r8 + 415a: 4629 mov r1, r5 + 415c: 4620 mov r0, r4 + 415e: 47b8 blx r7 if (rc != 0) { - 4100: 4603 mov r3, r0 - 4102: b910 cbnz r0, 410a + 4160: 4603 mov r3, r0 + 4162: b910 cbnz r0, 416a return SYS_EIO; } return 0; } - 4104: 4618 mov r0, r3 - 4106: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 4164: 4618 mov r0, r3 + 4166: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} return SYS_EIO; - 410a: f06f 0304 mvn.w r3, #4 - 410e: e7f9 b.n 4104 + 416a: f06f 0304 mvn.w r3, #4 + 416e: e7f9 b.n 4164 return SYS_EINVAL; - 4110: f06f 0301 mvn.w r3, #1 - 4114: e7f6 b.n 4104 + 4170: f06f 0301 mvn.w r3, #1 + 4174: e7f6 b.n 4164 return SYS_EINVAL; - 4116: f06f 0301 mvn.w r3, #1 - 411a: e7f3 b.n 4104 - 411c: f06f 0301 mvn.w r3, #1 - 4120: e7f0 b.n 4104 + 4176: f06f 0301 mvn.w r3, #1 + 417a: e7f3 b.n 4164 + 417c: f06f 0301 mvn.w r3, #1 + 4180: e7f0 b.n 4164 ... -00004124 : +00004184 : #endif int hal_flash_write(uint8_t id, uint32_t address, const void *src, uint32_t num_bytes) { - 4124: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 4128: 4605 mov r5, r0 - 412a: 460e mov r6, r1 - 412c: 4690 mov r8, r2 - 412e: 461f mov r7, r3 + 4184: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 4188: 4605 mov r5, r0 + 418a: 460e mov r6, r1 + 418c: 4690 mov r8, r2 + 418e: 461f mov r7, r3 const struct hal_flash *hf; int rc; hf = hal_bsp_flash_dev(id); - 4130: f7fc fa92 bl 658 + 4190: f7fc fa62 bl 658 if (!hf) { - 4134: b310 cbz r0, 417c - 4136: 4604 mov r4, r0 + 4194: b310 cbz r0, 41dc + 4196: 4604 mov r4, r0 return SYS_EINVAL; } if (hal_flash_check_addr(hf, address) || - 4138: 4631 mov r1, r6 - 413a: f7ff ff95 bl 4068 - 413e: bb00 cbnz r0, 4182 + 4198: 4631 mov r1, r6 + 419a: f7ff ff95 bl 40c8 + 419e: bb00 cbnz r0, 41e2 hal_flash_check_addr(hf, address + num_bytes)) { - 4140: 19f1 adds r1, r6, r7 - 4142: 4620 mov r0, r4 - 4144: f7ff ff90 bl 4068 + 41a0: 19f1 adds r1, r6, r7 + 41a2: 4620 mov r0, r4 + 41a4: f7ff ff90 bl 40c8 if (hal_flash_check_addr(hf, address) || - 4148: b9f0 cbnz r0, 4188 + 41a8: b9f0 cbnz r0, 41e8 return SYS_EINVAL; } if (protected_flash[id / 8] & (1 << (id & 7))) { - 414a: 08eb lsrs r3, r5, #3 - 414c: 4a11 ldr r2, [pc, #68] ; (4194 ) - 414e: 5cd3 ldrb r3, [r2, r3] - 4150: f005 0507 and.w r5, r5, #7 - 4154: fa43 f505 asr.w r5, r3, r5 - 4158: f015 0f01 tst.w r5, #1 - 415c: d117 bne.n 418e + 41aa: 08eb lsrs r3, r5, #3 + 41ac: 4a11 ldr r2, [pc, #68] ; (41f4 ) + 41ae: 5cd3 ldrb r3, [r2, r3] + 41b0: f005 0507 and.w r5, r5, #7 + 41b4: fa43 f505 asr.w r5, r3, r5 + 41b8: f015 0f01 tst.w r5, #1 + 41bc: d117 bne.n 41ee return SYS_EACCES; } rc = hf->hf_itf->hff_write(hf, address, src, num_bytes); - 415e: 6823 ldr r3, [r4, #0] - 4160: 685d ldr r5, [r3, #4] - 4162: 463b mov r3, r7 - 4164: 4642 mov r2, r8 - 4166: 4631 mov r1, r6 - 4168: 4620 mov r0, r4 - 416a: 47a8 blx r5 + 41be: 6823 ldr r3, [r4, #0] + 41c0: 685d ldr r5, [r3, #4] + 41c2: 463b mov r3, r7 + 41c4: 4642 mov r2, r8 + 41c6: 4631 mov r1, r6 + 41c8: 4620 mov r0, r4 + 41ca: 47a8 blx r5 if (rc != 0) { - 416c: 4603 mov r3, r0 - 416e: b910 cbnz r0, 4176 + 41cc: 4603 mov r3, r0 + 41ce: b910 cbnz r0, 41d6 #if MYNEWT_VAL(HAL_FLASH_VERIFY_WRITES) assert(hal_flash_cmp(hf, address, src, num_bytes) == 0); #endif return 0; } - 4170: 4618 mov r0, r3 - 4172: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 41d0: 4618 mov r0, r3 + 41d2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} return SYS_EIO; - 4176: f06f 0304 mvn.w r3, #4 - 417a: e7f9 b.n 4170 + 41d6: f06f 0304 mvn.w r3, #4 + 41da: e7f9 b.n 41d0 return SYS_EINVAL; - 417c: f06f 0301 mvn.w r3, #1 - 4180: e7f6 b.n 4170 + 41dc: f06f 0301 mvn.w r3, #1 + 41e0: e7f6 b.n 41d0 return SYS_EINVAL; - 4182: f06f 0301 mvn.w r3, #1 - 4186: e7f3 b.n 4170 - 4188: f06f 0301 mvn.w r3, #1 - 418c: e7f0 b.n 4170 + 41e2: f06f 0301 mvn.w r3, #1 + 41e6: e7f3 b.n 41d0 + 41e8: f06f 0301 mvn.w r3, #1 + 41ec: e7f0 b.n 41d0 return SYS_EACCES; - 418e: f06f 0306 mvn.w r3, #6 - 4192: e7ed b.n 4170 - 4194: 20006320 .word 0x20006320 + 41ee: f06f 0306 mvn.w r3, #6 + 41f2: e7ed b.n 41d0 + 41f4: 20006320 .word 0x20006320 -00004198 : +000041f8 : return 0; } int hal_flash_erase(uint8_t id, uint32_t address, uint32_t num_bytes) { - 4198: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} - 419c: b083 sub sp, #12 - 419e: 4605 mov r5, r0 - 41a0: 460e mov r6, r1 - 41a2: 4690 mov r8, r2 + 41f8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} + 41fc: b083 sub sp, #12 + 41fe: 4605 mov r5, r0 + 4200: 460e mov r6, r1 + 4202: 4690 mov r8, r2 uint32_t end; uint32_t end_area; int i; int rc; hf = hal_bsp_flash_dev(id); - 41a4: f7fc fa58 bl 658 + 4204: f7fc fa28 bl 658 if (!hf) { - 41a8: 2800 cmp r0, #0 - 41aa: d04b beq.n 4244 - 41ac: 4604 mov r4, r0 + 4208: 2800 cmp r0, #0 + 420a: d04b beq.n 42a4 + 420c: 4604 mov r4, r0 return SYS_EINVAL; } if (hal_flash_check_addr(hf, address) || - 41ae: 4631 mov r1, r6 - 41b0: f7ff ff5a bl 4068 - 41b4: 2800 cmp r0, #0 - 41b6: d148 bne.n 424a + 420e: 4631 mov r1, r6 + 4210: f7ff ff5a bl 40c8 + 4214: 2800 cmp r0, #0 + 4216: d148 bne.n 42aa hal_flash_check_addr(hf, address + num_bytes)) { - 41b8: eb06 0708 add.w r7, r6, r8 - 41bc: 4639 mov r1, r7 - 41be: 4620 mov r0, r4 - 41c0: f7ff ff52 bl 4068 + 4218: eb06 0708 add.w r7, r6, r8 + 421c: 4639 mov r1, r7 + 421e: 4620 mov r0, r4 + 4220: f7ff ff52 bl 40c8 if (hal_flash_check_addr(hf, address) || - 41c4: 2800 cmp r0, #0 - 41c6: d143 bne.n 4250 + 4224: 2800 cmp r0, #0 + 4226: d143 bne.n 42b0 return SYS_EINVAL; } if (protected_flash[id / 8] & (1 << (id & 7))) { - 41c8: 08eb lsrs r3, r5, #3 - 41ca: 4a26 ldr r2, [pc, #152] ; (4264 ) - 41cc: 5cd3 ldrb r3, [r2, r3] - 41ce: f005 0507 and.w r5, r5, #7 - 41d2: fa43 f505 asr.w r5, r3, r5 - 41d6: f015 0501 ands.w r5, r5, #1 - 41da: d13c bne.n 4256 + 4228: 08eb lsrs r3, r5, #3 + 422a: 4a26 ldr r2, [pc, #152] ; (42c4 ) + 422c: 5cd3 ldrb r3, [r2, r3] + 422e: f005 0507 and.w r5, r5, #7 + 4232: fa43 f505 asr.w r5, r3, r5 + 4236: f015 0501 ands.w r5, r5, #1 + 423a: d13c bne.n 42b6 return SYS_EACCES; } end = address + num_bytes; if (end <= address) { - 41dc: 42b7 cmp r7, r6 - 41de: d93d bls.n 425c + 423c: 42b7 cmp r7, r6 + 423e: d93d bls.n 42bc * Check for wrap-around. */ return SYS_EINVAL; } if (hf->hf_itf->hff_erase) { - 41e0: 6823 ldr r3, [r4, #0] - 41e2: 699b ldr r3, [r3, #24] - 41e4: b363 cbz r3, 4240 + 4240: 6823 ldr r3, [r4, #0] + 4242: 699b ldr r3, [r3, #24] + 4244: b363 cbz r3, 42a0 hf->hf_itf->hff_erase(hf, address, num_bytes); - 41e6: 4642 mov r2, r8 - 41e8: 4631 mov r1, r6 - 41ea: 4620 mov r0, r4 - 41ec: 4798 blx r3 + 4246: 4642 mov r2, r8 + 4248: 4631 mov r1, r6 + 424a: 4620 mov r0, r4 + 424c: 4798 blx r3 #endif } } } return 0; } - 41ee: 4628 mov r0, r5 - 41f0: b003 add sp, #12 - 41f2: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} + 424e: 4628 mov r0, r5 + 4250: b003 add sp, #12 + 4252: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} assert(rc == 0); - 41f6: 2300 movs r3, #0 - 41f8: 461a mov r2, r3 - 41fa: 4619 mov r1, r3 - 41fc: 4618 mov r0, r3 - 41fe: f7fd fa85 bl 170c <__assert_func> + 4256: 2300 movs r3, #0 + 4258: 461a mov r2, r3 + 425a: 4619 mov r1, r3 + 425c: 4618 mov r0, r3 + 425e: f7fd fa55 bl 170c <__assert_func> for (i = 0; i < hf->hf_sector_cnt; i++) { - 4202: f108 0801 add.w r8, r8, #1 - 4206: 68e3 ldr r3, [r4, #12] - 4208: 4543 cmp r3, r8 - 420a: ddf0 ble.n 41ee + 4262: f108 0801 add.w r8, r8, #1 + 4266: 68e3 ldr r3, [r4, #12] + 4268: 4543 cmp r3, r8 + 426a: ddf0 ble.n 424e rc = hf->hf_itf->hff_sector_info(hf, i, &start, &size); - 420c: 6823 ldr r3, [r4, #0] - 420e: f8d3 900c ldr.w r9, [r3, #12] - 4212: 466b mov r3, sp - 4214: aa01 add r2, sp, #4 - 4216: 4641 mov r1, r8 - 4218: 4620 mov r0, r4 - 421a: 47c8 blx r9 + 426c: 6823 ldr r3, [r4, #0] + 426e: f8d3 900c ldr.w r9, [r3, #12] + 4272: 466b mov r3, sp + 4274: aa01 add r2, sp, #4 + 4276: 4641 mov r1, r8 + 4278: 4620 mov r0, r4 + 427a: 47c8 blx r9 assert(rc == 0); - 421c: 2800 cmp r0, #0 - 421e: d1ea bne.n 41f6 + 427c: 2800 cmp r0, #0 + 427e: d1ea bne.n 4256 end_area = start + size; - 4220: 9901 ldr r1, [sp, #4] - 4222: 9b00 ldr r3, [sp, #0] - 4224: 440b add r3, r1 + 4280: 9901 ldr r1, [sp, #4] + 4282: 9b00 ldr r3, [sp, #0] + 4284: 440b add r3, r1 if (address < end_area && end > start) { - 4226: 429e cmp r6, r3 - 4228: d2eb bcs.n 4202 - 422a: 428f cmp r7, r1 - 422c: d9e9 bls.n 4202 + 4286: 429e cmp r6, r3 + 4288: d2eb bcs.n 4262 + 428a: 428f cmp r7, r1 + 428c: d9e9 bls.n 4262 if (hf->hf_itf->hff_erase_sector(hf, start)) { - 422e: 6823 ldr r3, [r4, #0] - 4230: 689b ldr r3, [r3, #8] - 4232: 4620 mov r0, r4 - 4234: 4798 blx r3 - 4236: 2800 cmp r0, #0 - 4238: d0e3 beq.n 4202 + 428e: 6823 ldr r3, [r4, #0] + 4290: 689b ldr r3, [r3, #8] + 4292: 4620 mov r0, r4 + 4294: 4798 blx r3 + 4296: 2800 cmp r0, #0 + 4298: d0e3 beq.n 4262 return SYS_EIO; - 423a: f06f 0504 mvn.w r5, #4 - 423e: e7d6 b.n 41ee + 429a: f06f 0504 mvn.w r5, #4 + 429e: e7d6 b.n 424e for (i = 0; i < hf->hf_sector_cnt; i++) { - 4240: 46a8 mov r8, r5 - 4242: e7e0 b.n 4206 + 42a0: 46a8 mov r8, r5 + 42a2: e7e0 b.n 4266 return SYS_EINVAL; - 4244: f06f 0501 mvn.w r5, #1 - 4248: e7d1 b.n 41ee + 42a4: f06f 0501 mvn.w r5, #1 + 42a8: e7d1 b.n 424e return SYS_EINVAL; - 424a: f06f 0501 mvn.w r5, #1 - 424e: e7ce b.n 41ee - 4250: f06f 0501 mvn.w r5, #1 - 4254: e7cb b.n 41ee + 42aa: f06f 0501 mvn.w r5, #1 + 42ae: e7ce b.n 424e + 42b0: f06f 0501 mvn.w r5, #1 + 42b4: e7cb b.n 424e return SYS_EACCES; - 4256: f06f 0506 mvn.w r5, #6 - 425a: e7c8 b.n 41ee + 42b6: f06f 0506 mvn.w r5, #6 + 42ba: e7c8 b.n 424e return SYS_EINVAL; - 425c: f06f 0501 mvn.w r5, #1 - 4260: e7c5 b.n 41ee - 4262: bf00 nop - 4264: 20006320 .word 0x20006320 + 42bc: f06f 0501 mvn.w r5, #1 + 42c0: e7c5 b.n 424e + 42c2: bf00 nop + 42c4: 20006320 .word 0x20006320 -00004268 : +000042c8 : int hal_flash_is_erased(const struct hal_flash *hf, uint32_t address, void *dst, uint32_t num_bytes) { - 4268: b5f8 push {r3, r4, r5, r6, r7, lr} - 426a: 4604 mov r4, r0 - 426c: 4616 mov r6, r2 - 426e: 461d mov r5, r3 + 42c8: b5f8 push {r3, r4, r5, r6, r7, lr} + 42ca: 4604 mov r4, r0 + 42cc: 4616 mov r6, r2 + 42ce: 461d mov r5, r3 uint8_t *buf; int rc; buf = dst; rc = hf->hf_itf->hff_read(hf, address, dst, num_bytes); - 4270: 6807 ldr r7, [r0, #0] - 4272: 683f ldr r7, [r7, #0] - 4274: 47b8 blx r7 + 42d0: 6807 ldr r7, [r0, #0] + 42d2: 683f ldr r7, [r7, #0] + 42d4: 47b8 blx r7 if (rc != 0) { - 4276: b960 cbnz r0, 4292 - 4278: 4607 mov r7, r0 + 42d6: b960 cbnz r0, 42f2 + 42d8: 4607 mov r7, r0 return SYS_EIO; } for (i = 0; i < num_bytes; i++) { - 427a: 2300 movs r3, #0 - 427c: 42ab cmp r3, r5 - 427e: d205 bcs.n 428c + 42da: 2300 movs r3, #0 + 42dc: 42ab cmp r3, r5 + 42de: d205 bcs.n 42ec if (buf[i] != hf->hf_erased_val) { - 4280: 5cf1 ldrb r1, [r6, r3] - 4282: 7d22 ldrb r2, [r4, #20] - 4284: 4291 cmp r1, r2 - 4286: d102 bne.n 428e + 42e0: 5cf1 ldrb r1, [r6, r3] + 42e2: 7d22 ldrb r2, [r4, #20] + 42e4: 4291 cmp r1, r2 + 42e6: d102 bne.n 42ee for (i = 0; i < num_bytes; i++) { - 4288: 3301 adds r3, #1 - 428a: e7f7 b.n 427c + 42e8: 3301 adds r3, #1 + 42ea: e7f7 b.n 42dc return 0; } } return 1; - 428c: 2701 movs r7, #1 + 42ec: 2701 movs r7, #1 } - 428e: 4638 mov r0, r7 - 4290: bdf8 pop {r3, r4, r5, r6, r7, pc} + 42ee: 4638 mov r0, r7 + 42f0: bdf8 pop {r3, r4, r5, r6, r7, pc} return SYS_EIO; - 4292: f06f 0704 mvn.w r7, #4 - 4296: e7fa b.n 428e + 42f2: f06f 0704 mvn.w r7, #4 + 42f6: e7fa b.n 42ee -00004298 : +000042f8 : int hal_flash_isempty(uint8_t id, uint32_t address, void *dst, uint32_t num_bytes) { - 4298: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 429c: 460d mov r5, r1 - 429e: 4690 mov r8, r2 - 42a0: 461e mov r6, r3 + 42f8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 42fc: 460d mov r5, r1 + 42fe: 4690 mov r8, r2 + 4300: 461e mov r6, r3 const struct hal_flash *hf; int rc; hf = hal_bsp_flash_dev(id); - 42a2: f7fc f9d9 bl 658 + 4302: f7fc f9a9 bl 658 if (!hf) { - 42a6: b1f8 cbz r0, 42e8 - 42a8: 4604 mov r4, r0 + 4306: b1f8 cbz r0, 4348 + 4308: 4604 mov r4, r0 return SYS_EINVAL; } if (hal_flash_check_addr(hf, address) || - 42aa: 4629 mov r1, r5 - 42ac: f7ff fedc bl 4068 - 42b0: b9e8 cbnz r0, 42ee + 430a: 4629 mov r1, r5 + 430c: f7ff fedc bl 40c8 + 4310: b9e8 cbnz r0, 434e hal_flash_check_addr(hf, address + num_bytes)) { - 42b2: 19a9 adds r1, r5, r6 - 42b4: 4620 mov r0, r4 - 42b6: f7ff fed7 bl 4068 + 4312: 19a9 adds r1, r5, r6 + 4314: 4620 mov r0, r4 + 4316: f7ff fed7 bl 40c8 if (hal_flash_check_addr(hf, address) || - 42ba: b9d8 cbnz r0, 42f4 + 431a: b9d8 cbnz r0, 4354 return SYS_EINVAL; } if (hf->hf_itf->hff_is_empty) { - 42bc: 6823 ldr r3, [r4, #0] - 42be: 691f ldr r7, [r3, #16] - 42c0: b15f cbz r7, 42da + 431c: 6823 ldr r3, [r4, #0] + 431e: 691f ldr r7, [r3, #16] + 4320: b15f cbz r7, 433a rc = hf->hf_itf->hff_is_empty(hf, address, dst, num_bytes); - 42c2: 4633 mov r3, r6 - 42c4: 4642 mov r2, r8 - 42c6: 4629 mov r1, r5 - 42c8: 4620 mov r0, r4 - 42ca: 47b8 blx r7 + 4322: 4633 mov r3, r6 + 4324: 4642 mov r2, r8 + 4326: 4629 mov r1, r5 + 4328: 4620 mov r0, r4 + 432a: 47b8 blx r7 if (rc < 0) { - 42cc: 2800 cmp r0, #0 - 42ce: db01 blt.n 42d4 + 432c: 2800 cmp r0, #0 + 432e: db01 blt.n 4334 return rc; } } else { return hal_flash_is_erased(hf, address, dst, num_bytes); } } - 42d0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 4330: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} return SYS_EIO; - 42d4: f06f 0004 mvn.w r0, #4 - 42d8: e7fa b.n 42d0 + 4334: f06f 0004 mvn.w r0, #4 + 4338: e7fa b.n 4330 return hal_flash_is_erased(hf, address, dst, num_bytes); - 42da: 4633 mov r3, r6 - 42dc: 4642 mov r2, r8 - 42de: 4629 mov r1, r5 - 42e0: 4620 mov r0, r4 - 42e2: f7ff ffc1 bl 4268 - 42e6: e7f3 b.n 42d0 + 433a: 4633 mov r3, r6 + 433c: 4642 mov r2, r8 + 433e: 4629 mov r1, r5 + 4340: 4620 mov r0, r4 + 4342: f7ff ffc1 bl 42c8 + 4346: e7f3 b.n 4330 return SYS_EINVAL; - 42e8: f06f 0001 mvn.w r0, #1 - 42ec: e7f0 b.n 42d0 + 4348: f06f 0001 mvn.w r0, #1 + 434c: e7f0 b.n 4330 return SYS_EINVAL; - 42ee: f06f 0001 mvn.w r0, #1 - 42f2: e7ed b.n 42d0 - 42f4: f06f 0001 mvn.w r0, #1 - 42f8: e7ea b.n 42d0 + 434e: f06f 0001 mvn.w r0, #1 + 4352: e7ed b.n 4330 + 4354: f06f 0001 mvn.w r0, #1 + 4358: e7ea b.n 4330 -000042fa : +0000435a : //// /* 1st word is stack pointer */ ////TODO //// " msr psp, %0 \n" ////TODO /* 2nd word is a reset handler (image entry) */ " bx %1 \n" : /* no output */ : "r" (img_data[0]), "r" (img_data[1])); - 42fa: 6803 ldr r3, [r0, #0] - 42fc: 6842 ldr r2, [r0, #4] + 435a: 6803 ldr r3, [r0, #0] + 435c: 6842 ldr r2, [r0, #4] asm volatile (".syntax unified \n" - 42fe: f383 8808 msr MSP, r3 - 4302: 4710 bx r2 + 435e: f383 8808 msr MSP, r3 + 4362: 4710 bx r2 -00004304 : +00004364 : if (stream->vmt->read == NULL) return 0; return stream->vmt->read(stream, (char*)buf, size*nmemb) / size; } __extern_inline size_t fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream) { - 4304: b538 push {r3, r4, r5, lr} + 4364: b538 push {r3, r4, r5, lr} if (stream->vmt->write == NULL) return 0; - 4306: 681c ldr r4, [r3, #0] - 4308: 6825 ldr r5, [r4, #0] - 430a: b145 cbz r5, 431e - 430c: 460c mov r4, r1 - 430e: 4601 mov r1, r0 + 4366: 681c ldr r4, [r3, #0] + 4368: 6825 ldr r5, [r4, #0] + 436a: b145 cbz r5, 437e + 436c: 460c mov r4, r1 + 436e: 4601 mov r1, r0 return stream->vmt->write(stream, (char*)buf, size*nmemb) / size; - 4310: fb02 f204 mul.w r2, r2, r4 - 4314: 4618 mov r0, r3 - 4316: 47a8 blx r5 - 4318: fbb0 f0f4 udiv r0, r0, r4 + 4370: fb02 f204 mul.w r2, r2, r4 + 4374: 4618 mov r0, r3 + 4376: 47a8 blx r5 + 4378: fbb0 f0f4 udiv r0, r0, r4 } - 431c: bd38 pop {r3, r4, r5, pc} + 437c: bd38 pop {r3, r4, r5, pc} if (stream->vmt->write == NULL) return 0; - 431e: 2000 movs r0, #0 - 4320: e7fc b.n 431c + 437e: 2000 movs r0, #0 + 4380: e7fc b.n 437c ... -00004324 : +00004384 : { return fwrite(s, 1, strlen(s), f); } __extern_inline int puts(const char *s) { - 4324: b538 push {r3, r4, r5, lr} - 4326: 4605 mov r5, r0 + 4384: b538 push {r3, r4, r5, lr} + 4386: 4605 mov r5, r0 return fwrite(s, 1, strlen(s), stdout) + fwrite("\n", 1, 1, stdout); - 4328: f000 f820 bl 436c - 432c: 4b08 ldr r3, [pc, #32] ; (4350 ) - 432e: 681c ldr r4, [r3, #0] - 4330: 4623 mov r3, r4 - 4332: 4602 mov r2, r0 - 4334: 2101 movs r1, #1 - 4336: 4628 mov r0, r5 - 4338: f7ff ffe4 bl 4304 - 433c: 4605 mov r5, r0 - 433e: 4623 mov r3, r4 - 4340: 2201 movs r2, #1 - 4342: 4611 mov r1, r2 - 4344: 4803 ldr r0, [pc, #12] ; (4354 ) - 4346: f7ff ffdd bl 4304 -} - 434a: 4428 add r0, r5 - 434c: bd38 pop {r3, r4, r5, pc} - 434e: bf00 nop - 4350: 000057f8 .word 0x000057f8 - 4354: 00005480 .word 0x00005480 - -00004358 : + 4388: f000 f820 bl 43cc + 438c: 4b08 ldr r3, [pc, #32] ; (43b0 ) + 438e: 681c ldr r4, [r3, #0] + 4390: 4623 mov r3, r4 + 4392: 4602 mov r2, r0 + 4394: 2101 movs r1, #1 + 4396: 4628 mov r0, r5 + 4398: f7ff ffe4 bl 4364 + 439c: 4605 mov r5, r0 + 439e: 4623 mov r3, r4 + 43a0: 2201 movs r2, #1 + 43a2: 4611 mov r1, r2 + 43a4: 4803 ldr r0, [pc, #12] ; (43b4 ) + 43a6: f7ff ffdd bl 4364 +} + 43aa: 4428 add r0, r5 + 43ac: bd38 pop {r3, r4, r5, pc} + 43ae: bf00 nop + 43b0: 000058a0 .word 0x000058a0 + 43b4: 00005528 .word 0x00005528 + +000043b8 : static size_t stdin_read(FILE *fp, char *bp, size_t n) { return 0; } - 4358: 2000 movs r0, #0 - 435a: 4770 bx lr + 43b8: 2000 movs r0, #0 + 43ba: 4770 bx lr -0000435c : +000043bc : static size_t stdout_write(FILE *fp, const char *bp, size_t n) { - 435c: b510 push {r4, lr} - 435e: 4608 mov r0, r1 - 4360: 4614 mov r4, r2 + 43bc: b510 push {r4, lr} + 43be: 4608 mov r0, r1 + 43c0: 4614 mov r4, r2 console_write(bp, n); - 4362: 4611 mov r1, r2 - 4364: f7fd ffa6 bl 22b4 + 43c2: 4611 mov r1, r2 + 43c4: f7fd ffa6 bl 2314 return n; } - 4368: 4620 mov r0, r4 - 436a: bd10 pop {r4, pc} + 43c8: 4620 mov r0, r4 + 43ca: bd10 pop {r4, pc} -0000436c : +000043cc : #include size_t strlen(const char *s) { const char *ss = s; - 436c: 4603 mov r3, r0 + 43cc: 4603 mov r3, r0 while (*ss) - 436e: e000 b.n 4372 + 43ce: e000 b.n 43d2 ss++; - 4370: 3301 adds r3, #1 + 43d0: 3301 adds r3, #1 while (*ss) - 4372: 781a ldrb r2, [r3, #0] - 4374: 2a00 cmp r2, #0 - 4376: d1fb bne.n 4370 + 43d2: 781a ldrb r2, [r3, #0] + 43d4: 2a00 cmp r2, #0 + 43d6: d1fb bne.n 43d0 return ss - s; } - 4378: 1a18 subs r0, r3, r0 - 437a: 4770 bx lr + 43d8: 1a18 subs r0, r3, r0 + 43da: 4770 bx lr -0000437c : +000043dc : char base; /**< number base (e.g.: 8, 10, 16) */ char *bf; /**< Buffer to output */ }; static void ui2a(unsigned long long int num, struct param *p) { - 437c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 4380: b082 sub sp, #8 - 4382: e9cd 0100 strd r0, r1, [sp] - 4386: 4691 mov r9, r2 + 43dc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 43e0: b082 sub sp, #8 + 43e2: e9cd 0100 strd r0, r1, [sp] + 43e6: 4691 mov r9, r2 int n = 0; unsigned long long int d = 1; char *bf = p->bf; - 4388: f8d2 8004 ldr.w r8, [r2, #4] + 43e8: f8d2 8004 ldr.w r8, [r2, #4] unsigned long long int d = 1; - 438c: 2401 movs r4, #1 - 438e: 2500 movs r5, #0 + 43ec: 2401 movs r4, #1 + 43ee: 2500 movs r5, #0 while (num / d >= p->base) - 4390: e004 b.n 439c + 43f0: e004 b.n 43fc d *= p->base; - 4392: fb06 f305 mul.w r3, r6, r5 - 4396: fba4 4506 umull r4, r5, r4, r6 - 439a: 441d add r5, r3 + 43f2: fb06 f305 mul.w r3, r6, r5 + 43f6: fba4 4506 umull r4, r5, r4, r6 + 43fa: 441d add r5, r3 while (num / d >= p->base) - 439c: 4622 mov r2, r4 - 439e: 462b mov r3, r5 - 43a0: e9dd 0100 ldrd r0, r1, [sp] - 43a4: f000 fd12 bl 4dcc <__aeabi_uldivmod> - 43a8: f899 6003 ldrb.w r6, [r9, #3] - 43ac: 2700 movs r7, #0 - 43ae: 42b9 cmp r1, r7 - 43b0: bf08 it eq - 43b2: 42b0 cmpeq r0, r6 - 43b4: d2ed bcs.n 4392 + 43fc: 4622 mov r2, r4 + 43fe: 462b mov r3, r5 + 4400: e9dd 0100 ldrd r0, r1, [sp] + 4404: f000 fd12 bl 4e2c <__aeabi_uldivmod> + 4408: f899 6003 ldrb.w r6, [r9, #3] + 440c: 2700 movs r7, #0 + 440e: 42b9 cmp r1, r7 + 4410: bf08 it eq + 4412: 42b0 cmpeq r0, r6 + 4414: d2ed bcs.n 43f2 int n = 0; - 43b6: f04f 0a00 mov.w sl, #0 - 43ba: e007 b.n 43cc + 4416: f04f 0a00 mov.w sl, #0 + 441a: e007 b.n 442c while (d != 0) { unsigned long long dgt = num / d; num %= d; d /= p->base; if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); - 43bc: 2330 movs r3, #48 ; 0x30 - 43be: 441e add r6, r3 - 43c0: f888 6000 strb.w r6, [r8] + 441c: 2330 movs r3, #48 ; 0x30 + 441e: 441e add r6, r3 + 4420: f888 6000 strb.w r6, [r8] ++n; - 43c4: f10a 0a01 add.w sl, sl, #1 + 4424: f10a 0a01 add.w sl, sl, #1 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); - 43c8: f108 0801 add.w r8, r8, #1 + 4428: f108 0801 add.w r8, r8, #1 while (d != 0) { - 43cc: ea54 0305 orrs.w r3, r4, r5 - 43d0: d02e beq.n 4430 + 442c: ea54 0305 orrs.w r3, r4, r5 + 4430: d02e beq.n 4490 unsigned long long dgt = num / d; - 43d2: 4622 mov r2, r4 - 43d4: 462b mov r3, r5 - 43d6: e9dd 0100 ldrd r0, r1, [sp] - 43da: f000 fcf7 bl 4dcc <__aeabi_uldivmod> - 43de: 4606 mov r6, r0 - 43e0: 460f mov r7, r1 + 4432: 4622 mov r2, r4 + 4434: 462b mov r3, r5 + 4436: e9dd 0100 ldrd r0, r1, [sp] + 443a: f000 fcf7 bl 4e2c <__aeabi_uldivmod> + 443e: 4606 mov r6, r0 + 4440: 460f mov r7, r1 num %= d; - 43e2: 4622 mov r2, r4 - 43e4: 462b mov r3, r5 - 43e6: e9dd 0100 ldrd r0, r1, [sp] - 43ea: f000 fcef bl 4dcc <__aeabi_uldivmod> - 43ee: e9cd 2300 strd r2, r3, [sp] + 4442: 4622 mov r2, r4 + 4444: 462b mov r3, r5 + 4446: e9dd 0100 ldrd r0, r1, [sp] + 444a: f000 fcef bl 4e2c <__aeabi_uldivmod> + 444e: e9cd 2300 strd r2, r3, [sp] d /= p->base; - 43f2: f899 2003 ldrb.w r2, [r9, #3] - 43f6: 2300 movs r3, #0 - 43f8: 4620 mov r0, r4 - 43fa: 4629 mov r1, r5 - 43fc: f000 fce6 bl 4dcc <__aeabi_uldivmod> - 4400: 4604 mov r4, r0 - 4402: 460d mov r5, r1 + 4452: f899 2003 ldrb.w r2, [r9, #3] + 4456: 2300 movs r3, #0 + 4458: 4620 mov r0, r4 + 445a: 4629 mov r1, r5 + 445c: f000 fce6 bl 4e2c <__aeabi_uldivmod> + 4460: 4604 mov r4, r0 + 4462: 460d mov r5, r1 if (n || dgt > 0 || d == 0) { - 4404: f1ba 0f00 cmp.w sl, #0 - 4408: d105 bne.n 4416 - 440a: ea56 0307 orrs.w r3, r6, r7 - 440e: d102 bne.n 4416 - 4410: ea54 0305 orrs.w r3, r4, r5 - 4414: d1da bne.n 43cc + 4464: f1ba 0f00 cmp.w sl, #0 + 4468: d105 bne.n 4476 + 446a: ea56 0307 orrs.w r3, r6, r7 + 446e: d102 bne.n 4476 + 4470: ea54 0305 orrs.w r3, r4, r5 + 4474: d1da bne.n 442c *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); - 4416: 2f00 cmp r7, #0 - 4418: bf08 it eq - 441a: 2e0a cmpeq r6, #10 - 441c: d3ce bcc.n 43bc - 441e: f899 3002 ldrb.w r3, [r9, #2] - 4422: f013 0f04 tst.w r3, #4 - 4426: d001 beq.n 442c - 4428: 2337 movs r3, #55 ; 0x37 - 442a: e7c8 b.n 43be - 442c: 2357 movs r3, #87 ; 0x57 - 442e: e7c6 b.n 43be + 4476: 2f00 cmp r7, #0 + 4478: bf08 it eq + 447a: 2e0a cmpeq r6, #10 + 447c: d3ce bcc.n 441c + 447e: f899 3002 ldrb.w r3, [r9, #2] + 4482: f013 0f04 tst.w r3, #4 + 4486: d001 beq.n 448c + 4488: 2337 movs r3, #55 ; 0x37 + 448a: e7c8 b.n 441e + 448c: 2357 movs r3, #87 ; 0x57 + 448e: e7c6 b.n 441e } } *bf = 0; - 4430: 2300 movs r3, #0 - 4432: f888 3000 strb.w r3, [r8] + 4490: 2300 movs r3, #0 + 4492: f888 3000 strb.w r3, [r8] } - 4436: b002 add sp, #8 - 4438: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 4496: b002 add sp, #8 + 4498: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} -0000443c : +0000449c : static void i2a(long long int num, struct param *p) { - 443c: b508 push {r3, lr} + 449c: b508 push {r3, lr} if (num < 0) { - 443e: 2800 cmp r0, #0 - 4440: f171 0300 sbcs.w r3, r1, #0 - 4444: db02 blt.n 444c + 449e: 2800 cmp r0, #0 + 44a0: f171 0300 sbcs.w r3, r1, #0 + 44a4: db02 blt.n 44ac num = -num; p->sign = 1; } ui2a(num, p); - 4446: f7ff ff99 bl 437c + 44a6: f7ff ff99 bl 43dc } - 444a: bd08 pop {r3, pc} + 44aa: bd08 pop {r3, pc} num = -num; - 444c: 4240 negs r0, r0 - 444e: eb61 0141 sbc.w r1, r1, r1, lsl #1 + 44ac: 4240 negs r0, r0 + 44ae: eb61 0141 sbc.w r1, r1, r1, lsl #1 p->sign = 1; - 4452: 7893 ldrb r3, [r2, #2] - 4454: f043 0301 orr.w r3, r3, #1 - 4458: 7093 strb r3, [r2, #2] - 445a: e7f4 b.n 4446 + 44b2: 7893 ldrb r3, [r2, #2] + 44b4: f043 0301 orr.w r3, r3, #1 + 44b8: 7093 strb r3, [r2, #2] + 44ba: e7f4 b.n 44a6 -0000445c : +000044bc : static int a2d(char ch) { if (ch >= '0' && ch <= '9') - 445c: f1a0 0330 sub.w r3, r0, #48 ; 0x30 - 4460: b2db uxtb r3, r3 - 4462: 2b09 cmp r3, #9 - 4464: d90b bls.n 447e + 44bc: f1a0 0330 sub.w r3, r0, #48 ; 0x30 + 44c0: b2db uxtb r3, r3 + 44c2: 2b09 cmp r3, #9 + 44c4: d90b bls.n 44de return ch - '0'; else if (ch >= 'a' && ch <= 'f') - 4466: f1a0 0361 sub.w r3, r0, #97 ; 0x61 - 446a: b2db uxtb r3, r3 - 446c: 2b05 cmp r3, #5 - 446e: d908 bls.n 4482 + 44c6: f1a0 0361 sub.w r3, r0, #97 ; 0x61 + 44ca: b2db uxtb r3, r3 + 44cc: 2b05 cmp r3, #5 + 44ce: d908 bls.n 44e2 return ch - 'a' + 10; else if (ch >= 'A' && ch <= 'F') - 4470: f1a0 0341 sub.w r3, r0, #65 ; 0x41 - 4474: b2db uxtb r3, r3 - 4476: 2b05 cmp r3, #5 - 4478: d805 bhi.n 4486 + 44d0: f1a0 0341 sub.w r3, r0, #65 ; 0x41 + 44d4: b2db uxtb r3, r3 + 44d6: 2b05 cmp r3, #5 + 44d8: d805 bhi.n 44e6 return ch - 'A' + 10; - 447a: 3837 subs r0, #55 ; 0x37 - 447c: 4770 bx lr + 44da: 3837 subs r0, #55 ; 0x37 + 44dc: 4770 bx lr return ch - '0'; - 447e: 3830 subs r0, #48 ; 0x30 - 4480: 4770 bx lr + 44de: 3830 subs r0, #48 ; 0x30 + 44e0: 4770 bx lr return ch - 'a' + 10; - 4482: 3857 subs r0, #87 ; 0x57 - 4484: 4770 bx lr + 44e2: 3857 subs r0, #87 ; 0x57 + 44e4: 4770 bx lr else return -1; - 4486: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 44e6: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff } - 448a: 4770 bx lr + 44ea: 4770 bx lr -0000448c : +000044ec : static char a2i(char ch, const char **src, int base, unsigned char *nump) { - 448c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} - 4490: 4605 mov r5, r0 - 4492: 4688 mov r8, r1 - 4494: 4617 mov r7, r2 - 4496: 4699 mov r9, r3 + 44ec: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} + 44f0: 4605 mov r5, r0 + 44f2: 4688 mov r8, r1 + 44f4: 4617 mov r7, r2 + 44f6: 4699 mov r9, r3 const char *p = *src; - 4498: 680c ldr r4, [r1, #0] + 44f8: 680c ldr r4, [r1, #0] int num = 0; - 449a: 2600 movs r6, #0 + 44fa: 2600 movs r6, #0 int digit; while ((digit = a2d(ch)) >= 0) { - 449c: 4628 mov r0, r5 - 449e: f7ff ffdd bl 445c - 44a2: 2800 cmp r0, #0 - 44a4: db06 blt.n 44b4 + 44fc: 4628 mov r0, r5 + 44fe: f7ff ffdd bl 44bc + 4502: 2800 cmp r0, #0 + 4504: db06 blt.n 4514 if (digit > base) - 44a6: 42b8 cmp r0, r7 - 44a8: dc04 bgt.n 44b4 + 4506: 42b8 cmp r0, r7 + 4508: dc04 bgt.n 4514 break; num = num * base + digit; - 44aa: fb07 0606 mla r6, r7, r6, r0 + 450a: fb07 0606 mla r6, r7, r6, r0 ch = *p++; - 44ae: 7825 ldrb r5, [r4, #0] - 44b0: 3401 adds r4, #1 - 44b2: e7f3 b.n 449c + 450e: 7825 ldrb r5, [r4, #0] + 4510: 3401 adds r4, #1 + 4512: e7f3 b.n 44fc } *src = p; - 44b4: f8c8 4000 str.w r4, [r8] + 4514: f8c8 4000 str.w r4, [r8] *nump = num; - 44b8: f889 6000 strb.w r6, [r9] + 4518: f889 6000 strb.w r6, [r9] return ch; } - 44bc: 4628 mov r0, r5 - 44be: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} + 451c: 4628 mov r0, r5 + 451e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} -000044c2 : +00004522 : static int putf(FILE *putp, char c) { - 44c2: b500 push {lr} - 44c4: b083 sub sp, #12 + 4522: b500 push {lr} + 4524: b083 sub sp, #12 __extern_inline int fputc(int c, FILE *f) { unsigned char ch = c; - 44c6: f88d 1007 strb.w r1, [sp, #7] + 4526: f88d 1007 strb.w r1, [sp, #7] if (stream->vmt->write == NULL) return 0; - 44ca: 6803 ldr r3, [r0, #0] - 44cc: 681b ldr r3, [r3, #0] - 44ce: b14b cbz r3, 44e4 + 452a: 6803 ldr r3, [r0, #0] + 452c: 681b ldr r3, [r3, #0] + 452e: b14b cbz r3, 4544 return stream->vmt->write(stream, (char*)buf, size*nmemb) / size; - 44d0: 2201 movs r2, #1 - 44d2: f10d 0107 add.w r1, sp, #7 - 44d6: 4798 blx r3 + 4530: 2201 movs r2, #1 + 4532: f10d 0107 add.w r1, sp, #7 + 4536: 4798 blx r3 return fwrite(&ch, 1, 1, f) == 1 ? ch : EOF; - 44d8: 2801 cmp r0, #1 - 44da: d005 beq.n 44e8 + 4538: 2801 cmp r0, #1 + 453a: d005 beq.n 4548 if (fputc(c, putp) == EOF) return 0; - 44dc: 2000 movs r0, #0 + 453c: 2000 movs r0, #0 else return 1; } - 44de: b003 add sp, #12 - 44e0: f85d fb04 ldr.w pc, [sp], #4 + 453e: b003 add sp, #12 + 4540: f85d fb04 ldr.w pc, [sp], #4 return 0; - 44e4: 2000 movs r0, #0 - 44e6: e7fa b.n 44de + 4544: 2000 movs r0, #0 + 4546: e7fa b.n 453e return 1; - 44e8: 2001 movs r0, #1 - 44ea: e7f8 b.n 44de + 4548: 2001 movs r0, #1 + 454a: e7f8 b.n 453e -000044ec : +0000454c : static unsigned putchw(FILE *putp, struct param *p) { - 44ec: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 44f0: 4606 mov r6, r0 - 44f2: 460f mov r7, r1 + 454c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 4550: 4606 mov r6, r0 + 4552: 460f mov r7, r1 unsigned written = 0; char ch; int n = p->width; - 44f4: 780c ldrb r4, [r1, #0] + 4554: 780c ldrb r4, [r1, #0] char *bf = p->bf; - 44f6: 684b ldr r3, [r1, #4] + 4556: 684b ldr r3, [r1, #4] /* Number of filling characters */ while (*bf++ && n > 0) - 44f8: e001 b.n 44fe + 4558: e001 b.n 455e n--; - 44fa: 3c01 subs r4, #1 + 455a: 3c01 subs r4, #1 while (*bf++ && n > 0) - 44fc: 4613 mov r3, r2 - 44fe: 1c5a adds r2, r3, #1 - 4500: 781b ldrb r3, [r3, #0] - 4502: b10b cbz r3, 4508 - 4504: 2c00 cmp r4, #0 - 4506: dcf8 bgt.n 44fa + 455c: 4613 mov r3, r2 + 455e: 1c5a adds r2, r3, #1 + 4560: 781b ldrb r3, [r3, #0] + 4562: b10b cbz r3, 4568 + 4564: 2c00 cmp r4, #0 + 4566: dcf8 bgt.n 455a if (p->sign) - 4508: 78bb ldrb r3, [r7, #2] - 450a: f013 0f01 tst.w r3, #1 - 450e: d000 beq.n 4512 + 4568: 78bb ldrb r3, [r7, #2] + 456a: f013 0f01 tst.w r3, #1 + 456e: d000 beq.n 4572 n--; - 4510: 3c01 subs r4, #1 + 4570: 3c01 subs r4, #1 if (p->alt && p->base == 16) - 4512: 887b ldrh r3, [r7, #2] - 4514: f023 03fd bic.w r3, r3, #253 ; 0xfd - 4518: b29b uxth r3, r3 - 451a: f241 0202 movw r2, #4098 ; 0x1002 - 451e: 4293 cmp r3, r2 - 4520: d01c beq.n 455c + 4572: 887b ldrh r3, [r7, #2] + 4574: f023 03fd bic.w r3, r3, #253 ; 0xfd + 4578: b29b uxth r3, r3 + 457a: f241 0202 movw r2, #4098 ; 0x1002 + 457e: 4293 cmp r3, r2 + 4580: d01c beq.n 45bc n -= 2; else if (p->alt && p->base == 8) - 4522: f640 0202 movw r2, #2050 ; 0x802 - 4526: 4293 cmp r3, r2 - 4528: d01a beq.n 4560 + 4582: f640 0202 movw r2, #2050 ; 0x802 + 4586: 4293 cmp r3, r2 + 4588: d01a beq.n 45c0 n--; /* Unless left-aligned, fill with space, before alternate or sign */ if (!p->lz && !p->left) { - 452a: 683b ldr r3, [r7, #0] - 452c: 4d35 ldr r5, [pc, #212] ; (4604 ) - 452e: 401d ands r5, r3 - 4530: b1f5 cbz r5, 4570 + 458a: 683b ldr r3, [r7, #0] + 458c: 4d35 ldr r5, [pc, #212] ; (4664 ) + 458e: 401d ands r5, r3 + 4590: b1f5 cbz r5, 45d0 unsigned written = 0; - 4532: 2500 movs r5, #0 + 4592: 2500 movs r5, #0 while (n-- > 0) written += putf(putp, ' '); } /* print sign */ if (p->sign) - 4534: 78bb ldrb r3, [r7, #2] - 4536: f013 0f01 tst.w r3, #1 - 453a: d11f bne.n 457c + 4594: 78bb ldrb r3, [r7, #2] + 4596: f013 0f01 tst.w r3, #1 + 459a: d11f bne.n 45dc written += putf(putp, '-'); /* Alternate */ if (p->alt && p->base == 16) { - 453c: 887b ldrh r3, [r7, #2] - 453e: f023 03fd bic.w r3, r3, #253 ; 0xfd - 4542: b29b uxth r3, r3 - 4544: f241 0202 movw r2, #4098 ; 0x1002 - 4548: 4293 cmp r3, r2 - 454a: d01d beq.n 4588 + 459c: 887b ldrh r3, [r7, #2] + 459e: f023 03fd bic.w r3, r3, #253 ; 0xfd + 45a2: b29b uxth r3, r3 + 45a4: f241 0202 movw r2, #4098 ; 0x1002 + 45a8: 4293 cmp r3, r2 + 45aa: d01d beq.n 45e8 written += putf(putp, '0'); written += putf(putp, (p->uc ? 'X' : 'x')); } else if (p->alt && p->base == 8) { - 454c: f640 0202 movw r2, #2050 ; 0x802 - 4550: 4293 cmp r3, r2 - 4552: d02a beq.n 45aa + 45ac: f640 0202 movw r2, #2050 ; 0x802 + 45b0: 4293 cmp r3, r2 + 45b2: d02a beq.n 460a written += putf(putp, '0'); } /* Fill with zeros, after alternate or sign */ if (p->lz) { - 4554: 787b ldrb r3, [r7, #1] - 4556: bba3 cbnz r3, 45c2 + 45b4: 787b ldrb r3, [r7, #1] + 45b6: bba3 cbnz r3, 4622 while (n-- > 0) written += putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; - 4558: 687b ldr r3, [r7, #4] + 45b8: 687b ldr r3, [r7, #4] while ((ch = *bf++)) - 455a: e03d b.n 45d8 + 45ba: e03d b.n 4638 n -= 2; - 455c: 3c02 subs r4, #2 - 455e: e7e4 b.n 452a + 45bc: 3c02 subs r4, #2 + 45be: e7e4 b.n 458a n--; - 4560: 3c01 subs r4, #1 - 4562: e7e2 b.n 452a + 45c0: 3c01 subs r4, #1 + 45c2: e7e2 b.n 458a written += putf(putp, ' '); - 4564: 2120 movs r1, #32 - 4566: 4630 mov r0, r6 - 4568: f7ff ffab bl 44c2 - 456c: 4405 add r5, r0 + 45c4: 2120 movs r1, #32 + 45c6: 4630 mov r0, r6 + 45c8: f7ff ffab bl 4522 + 45cc: 4405 add r5, r0 while (n-- > 0) - 456e: 4644 mov r4, r8 - 4570: f104 38ff add.w r8, r4, #4294967295 ; 0xffffffff - 4574: 2c00 cmp r4, #0 - 4576: dcf5 bgt.n 4564 - 4578: 4644 mov r4, r8 - 457a: e7db b.n 4534 + 45ce: 4644 mov r4, r8 + 45d0: f104 38ff add.w r8, r4, #4294967295 ; 0xffffffff + 45d4: 2c00 cmp r4, #0 + 45d6: dcf5 bgt.n 45c4 + 45d8: 4644 mov r4, r8 + 45da: e7db b.n 4594 written += putf(putp, '-'); - 457c: 212d movs r1, #45 ; 0x2d - 457e: 4630 mov r0, r6 - 4580: f7ff ff9f bl 44c2 - 4584: 4405 add r5, r0 - 4586: e7d9 b.n 453c + 45dc: 212d movs r1, #45 ; 0x2d + 45de: 4630 mov r0, r6 + 45e0: f7ff ff9f bl 4522 + 45e4: 4405 add r5, r0 + 45e6: e7d9 b.n 459c written += putf(putp, '0'); - 4588: 2130 movs r1, #48 ; 0x30 - 458a: 4630 mov r0, r6 - 458c: f7ff ff99 bl 44c2 - 4590: 4405 add r5, r0 + 45e8: 2130 movs r1, #48 ; 0x30 + 45ea: 4630 mov r0, r6 + 45ec: f7ff ff99 bl 4522 + 45f0: 4405 add r5, r0 written += putf(putp, (p->uc ? 'X' : 'x')); - 4592: 78bb ldrb r3, [r7, #2] - 4594: f013 0f04 tst.w r3, #4 - 4598: d005 beq.n 45a6 - 459a: 2158 movs r1, #88 ; 0x58 - 459c: 4630 mov r0, r6 - 459e: f7ff ff90 bl 44c2 - 45a2: 4405 add r5, r0 - 45a4: e7d6 b.n 4554 - 45a6: 2178 movs r1, #120 ; 0x78 - 45a8: e7f8 b.n 459c + 45f2: 78bb ldrb r3, [r7, #2] + 45f4: f013 0f04 tst.w r3, #4 + 45f8: d005 beq.n 4606 + 45fa: 2158 movs r1, #88 ; 0x58 + 45fc: 4630 mov r0, r6 + 45fe: f7ff ff90 bl 4522 + 4602: 4405 add r5, r0 + 4604: e7d6 b.n 45b4 + 4606: 2178 movs r1, #120 ; 0x78 + 4608: e7f8 b.n 45fc written += putf(putp, '0'); - 45aa: 2130 movs r1, #48 ; 0x30 - 45ac: 4630 mov r0, r6 - 45ae: f7ff ff88 bl 44c2 - 45b2: 4405 add r5, r0 - 45b4: e7ce b.n 4554 + 460a: 2130 movs r1, #48 ; 0x30 + 460c: 4630 mov r0, r6 + 460e: f7ff ff88 bl 4522 + 4612: 4405 add r5, r0 + 4614: e7ce b.n 45b4 written += putf(putp, '0'); - 45b6: 2130 movs r1, #48 ; 0x30 - 45b8: 4630 mov r0, r6 - 45ba: f7ff ff82 bl 44c2 - 45be: 4405 add r5, r0 + 4616: 2130 movs r1, #48 ; 0x30 + 4618: 4630 mov r0, r6 + 461a: f7ff ff82 bl 4522 + 461e: 4405 add r5, r0 while (n-- > 0) - 45c0: 4644 mov r4, r8 - 45c2: f104 38ff add.w r8, r4, #4294967295 ; 0xffffffff - 45c6: 2c00 cmp r4, #0 - 45c8: dcf5 bgt.n 45b6 - 45ca: 4644 mov r4, r8 - 45cc: e7c4 b.n 4558 + 4620: 4644 mov r4, r8 + 4622: f104 38ff add.w r8, r4, #4294967295 ; 0xffffffff + 4626: 2c00 cmp r4, #0 + 4628: dcf5 bgt.n 4616 + 462a: 4644 mov r4, r8 + 462c: e7c4 b.n 45b8 written += putf(putp, ch); - 45ce: 4630 mov r0, r6 - 45d0: f7ff ff77 bl 44c2 - 45d4: 4405 add r5, r0 + 462e: 4630 mov r0, r6 + 4630: f7ff ff77 bl 4522 + 4634: 4405 add r5, r0 while ((ch = *bf++)) - 45d6: 4643 mov r3, r8 - 45d8: f103 0801 add.w r8, r3, #1 - 45dc: 7819 ldrb r1, [r3, #0] - 45de: 2900 cmp r1, #0 - 45e0: d1f5 bne.n 45ce + 4636: 4643 mov r3, r8 + 4638: f103 0801 add.w r8, r3, #1 + 463c: 7819 ldrb r1, [r3, #0] + 463e: 2900 cmp r1, #0 + 4640: d1f5 bne.n 462e /* If left-aligned, pad the end with spaces. */ if (p->left) { - 45e2: 78bb ldrb r3, [r7, #2] - 45e4: f013 0f08 tst.w r3, #8 - 45e8: d106 bne.n 45f8 - 45ea: e008 b.n 45fe + 4642: 78bb ldrb r3, [r7, #2] + 4644: f013 0f08 tst.w r3, #8 + 4648: d106 bne.n 4658 + 464a: e008 b.n 465e while (n-- > 0) written += putf(putp, ' '); - 45ec: 2120 movs r1, #32 - 45ee: 4630 mov r0, r6 - 45f0: f7ff ff67 bl 44c2 - 45f4: 4405 add r5, r0 + 464c: 2120 movs r1, #32 + 464e: 4630 mov r0, r6 + 4650: f7ff ff67 bl 4522 + 4654: 4405 add r5, r0 while (n-- > 0) - 45f6: 463c mov r4, r7 - 45f8: 1e67 subs r7, r4, #1 - 45fa: 2c00 cmp r4, #0 - 45fc: dcf6 bgt.n 45ec + 4656: 463c mov r4, r7 + 4658: 1e67 subs r7, r4, #1 + 465a: 2c00 cmp r4, #0 + 465c: dcf6 bgt.n 464c } return written; } - 45fe: 4628 mov r0, r5 - 4600: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} - 4604: 0008ff00 .word 0x0008ff00 + 465e: 4628 mov r0, r5 + 4660: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} + 4664: 0008ff00 .word 0x0008ff00 -00004608 : +00004668 : static unsigned long long intarg(int lng, int sign, va_list *va) { unsigned long long val; switch (lng) { - 4608: b160 cbz r0, 4624 - 460a: 2801 cmp r0, #1 - 460c: d017 beq.n 463e + 4668: b160 cbz r0, 4684 + 466a: 2801 cmp r0, #1 + 466c: d017 beq.n 469e } break; case 2: default: if (sign) { - 460e: bb19 cbnz r1, 4658 + 466e: bb19 cbnz r1, 46b8 val = va_arg(*va, long long); } else { val = va_arg(*va, unsigned long long); - 4610: 6813 ldr r3, [r2, #0] - 4612: 3307 adds r3, #7 - 4614: f023 0307 bic.w r3, r3, #7 - 4618: f103 0108 add.w r1, r3, #8 - 461c: 6011 str r1, [r2, #0] - 461e: e9d3 0100 ldrd r0, r1, [r3] + 4670: 6813 ldr r3, [r2, #0] + 4672: 3307 adds r3, #7 + 4674: f023 0307 bic.w r3, r3, #7 + 4678: f103 0108 add.w r1, r3, #8 + 467c: 6011 str r1, [r2, #0] + 467e: e9d3 0100 ldrd r0, r1, [r3] } break; } return val; } - 4622: 4770 bx lr + 4682: 4770 bx lr if (sign) { - 4624: b129 cbz r1, 4632 + 4684: b129 cbz r1, 4692 val = va_arg(*va, int); - 4626: 6813 ldr r3, [r2, #0] - 4628: 1d19 adds r1, r3, #4 - 462a: 6011 str r1, [r2, #0] - 462c: 6818 ldr r0, [r3, #0] - 462e: 17c1 asrs r1, r0, #31 - 4630: 4770 bx lr + 4686: 6813 ldr r3, [r2, #0] + 4688: 1d19 adds r1, r3, #4 + 468a: 6011 str r1, [r2, #0] + 468c: 6818 ldr r0, [r3, #0] + 468e: 17c1 asrs r1, r0, #31 + 4690: 4770 bx lr val = va_arg(*va, unsigned int); - 4632: 6813 ldr r3, [r2, #0] - 4634: 1d19 adds r1, r3, #4 - 4636: 6011 str r1, [r2, #0] - 4638: 6818 ldr r0, [r3, #0] - 463a: 2100 movs r1, #0 - 463c: 4770 bx lr + 4692: 6813 ldr r3, [r2, #0] + 4694: 1d19 adds r1, r3, #4 + 4696: 6011 str r1, [r2, #0] + 4698: 6818 ldr r0, [r3, #0] + 469a: 2100 movs r1, #0 + 469c: 4770 bx lr if (sign) { - 463e: b129 cbz r1, 464c + 469e: b129 cbz r1, 46ac val = va_arg(*va, long); - 4640: 6813 ldr r3, [r2, #0] - 4642: 1d19 adds r1, r3, #4 - 4644: 6011 str r1, [r2, #0] - 4646: 6818 ldr r0, [r3, #0] - 4648: 17c1 asrs r1, r0, #31 - 464a: 4770 bx lr + 46a0: 6813 ldr r3, [r2, #0] + 46a2: 1d19 adds r1, r3, #4 + 46a4: 6011 str r1, [r2, #0] + 46a6: 6818 ldr r0, [r3, #0] + 46a8: 17c1 asrs r1, r0, #31 + 46aa: 4770 bx lr val = va_arg(*va, unsigned long); - 464c: 6813 ldr r3, [r2, #0] - 464e: 1d19 adds r1, r3, #4 - 4650: 6011 str r1, [r2, #0] - 4652: 6818 ldr r0, [r3, #0] - 4654: 2100 movs r1, #0 - 4656: 4770 bx lr + 46ac: 6813 ldr r3, [r2, #0] + 46ae: 1d19 adds r1, r3, #4 + 46b0: 6011 str r1, [r2, #0] + 46b2: 6818 ldr r0, [r3, #0] + 46b4: 2100 movs r1, #0 + 46b6: 4770 bx lr val = va_arg(*va, long long); - 4658: 6813 ldr r3, [r2, #0] - 465a: 3307 adds r3, #7 - 465c: f023 0307 bic.w r3, r3, #7 - 4660: f103 0108 add.w r1, r3, #8 - 4664: 6011 str r1, [r2, #0] - 4666: e9d3 0100 ldrd r0, r1, [r3] - 466a: 4770 bx lr + 46b8: 6813 ldr r3, [r2, #0] + 46ba: 3307 adds r3, #7 + 46bc: f023 0307 bic.w r3, r3, #7 + 46c0: f103 0108 add.w r1, r3, #8 + 46c4: 6011 str r1, [r2, #0] + 46c6: e9d3 0100 ldrd r0, r1, [r3] + 46ca: 4770 bx lr -0000466c : +000046cc : size_t tfp_format(FILE *putp, const char *fmt, va_list va) { - 466c: b570 push {r4, r5, r6, lr} - 466e: b08a sub sp, #40 ; 0x28 - 4670: 4605 mov r5, r0 - 4672: 9101 str r1, [sp, #4] - 4674: 9200 str r2, [sp, #0] + 46cc: b570 push {r4, r5, r6, lr} + 46ce: b08a sub sp, #40 ; 0x28 + 46d0: 4605 mov r5, r0 + 46d2: 9101 str r1, [sp, #4] + 46d4: 9200 str r2, [sp, #0] double d; int n; #endif int i; p.bf = bf; - 4676: ab02 add r3, sp, #8 - 4678: 9309 str r3, [sp, #36] ; 0x24 + 46d6: ab02 add r3, sp, #8 + 46d8: 9309 str r3, [sp, #36] ; 0x24 size_t written = 0; - 467a: 2400 movs r4, #0 + 46da: 2400 movs r4, #0 while ((ch = *(fmt++))) { - 467c: 9b01 ldr r3, [sp, #4] - 467e: 1c5a adds r2, r3, #1 - 4680: 9201 str r2, [sp, #4] - 4682: 7819 ldrb r1, [r3, #0] - 4684: 2900 cmp r1, #0 - 4686: f000 811c beq.w 48c2 + 46dc: 9b01 ldr r3, [sp, #4] + 46de: 1c5a adds r2, r3, #1 + 46e0: 9201 str r2, [sp, #4] + 46e2: 7819 ldrb r1, [r3, #0] + 46e4: 2900 cmp r1, #0 + 46e6: f000 811c beq.w 4922 if (ch != '%') { - 468a: 2925 cmp r1, #37 ; 0x25 - 468c: d004 beq.n 4698 + 46ea: 2925 cmp r1, #37 ; 0x25 + 46ec: d004 beq.n 46f8 written += putf(putp, ch); - 468e: 4628 mov r0, r5 - 4690: f7ff ff17 bl 44c2 - 4694: 4404 add r4, r0 - 4696: e7f1 b.n 467c + 46ee: 4628 mov r0, r5 + 46f0: f7ff ff17 bl 4522 + 46f4: 4404 add r4, r0 + 46f6: e7f1 b.n 46dc } else { /* Init parameter struct */ p.lz = 0; - 4698: 2200 movs r2, #0 - 469a: f88d 2021 strb.w r2, [sp, #33] ; 0x21 + 46f8: 2200 movs r2, #0 + 46fa: f88d 2021 strb.w r2, [sp, #33] ; 0x21 p.alt = 0; - 469e: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 + 46fe: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 p.width = 0; - 46a2: f88d 2020 strb.w r2, [sp, #32] + 4702: f88d 2020 strb.w r2, [sp, #32] p.sign = 0; p.left = 0; p.uc = 0; - 46a6: f003 03f4 and.w r3, r3, #244 ; 0xf4 - 46aa: f362 0382 bfi r3, r2, #2, #1 - 46ae: f88d 3022 strb.w r3, [sp, #34] ; 0x22 + 4706: f003 03f4 and.w r3, r3, #244 ; 0xf4 + 470a: f362 0382 bfi r3, r2, #2, #1 + 470e: f88d 3022 strb.w r3, [sp, #34] ; 0x22 lng = 0; /* Flags */ while ((ch = *(fmt++))) { - 46b2: 9b01 ldr r3, [sp, #4] - 46b4: 1c5a adds r2, r3, #1 - 46b6: 9201 str r2, [sp, #4] - 46b8: 7818 ldrb r0, [r3, #0] - 46ba: b128 cbz r0, 46c8 + 4712: 9b01 ldr r3, [sp, #4] + 4714: 1c5a adds r2, r3, #1 + 4716: 9201 str r2, [sp, #4] + 4718: 7818 ldrb r0, [r3, #0] + 471a: b128 cbz r0, 4728 switch (ch) { - 46bc: 282d cmp r0, #45 ; 0x2d - 46be: d04e beq.n 475e - 46c0: 2830 cmp r0, #48 ; 0x30 - 46c2: d03c beq.n 473e - 46c4: 2823 cmp r0, #35 ; 0x23 - 46c6: d043 beq.n 4750 + 471c: 282d cmp r0, #45 ; 0x2d + 471e: d04e beq.n 47be + 4720: 2830 cmp r0, #48 ; 0x30 + 4722: d03c beq.n 479e + 4724: 2823 cmp r0, #35 ; 0x23 + 4726: d043 beq.n 47b0 } break; } /* Width */ if (ch == '*') { - 46c8: 282a cmp r0, #42 ; 0x2a - 46ca: d052 beq.n 4772 + 4728: 282a cmp r0, #42 ; 0x2a + 472a: d052 beq.n 47d2 p.width = UCHAR_MAX; } else if (i > 0) { p.width = i; } ch = *(fmt++); } else if (ch >= '0' && ch <= '9') { - 46cc: f1a0 0330 sub.w r3, r0, #48 ; 0x30 - 46d0: b2db uxtb r3, r3 - 46d2: 2b09 cmp r3, #9 - 46d4: d961 bls.n 479a + 472c: f1a0 0330 sub.w r3, r0, #48 ; 0x30 + 4730: b2db uxtb r3, r3 + 4732: 2b09 cmp r3, #9 + 4734: d961 bls.n 47fa ch = a2i(ch, &fmt, 10, &(p.width)); } if (ch == 'l') { - 46d6: 286c cmp r0, #108 ; 0x6c - 46d8: d065 beq.n 47a6 + 4736: 286c cmp r0, #108 ; 0x6c + 4738: d065 beq.n 4806 lng = 0; - 46da: 2600 movs r6, #0 + 473a: 2600 movs r6, #0 ch = *(fmt++); lng = 2; } } if (ch == 'z') { - 46dc: 287a cmp r0, #122 ; 0x7a - 46de: d06f beq.n 47c0 + 473c: 287a cmp r0, #122 ; 0x7a + 473e: d06f beq.n 4820 ch = *(fmt++); } switch (ch) { - 46e0: 2869 cmp r0, #105 ; 0x69 - 46e2: f000 808e beq.w 4802 - 46e6: d970 bls.n 47ca - 46e8: 2873 cmp r0, #115 ; 0x73 - 46ea: f000 80dd beq.w 48a8 - 46ee: f200 8099 bhi.w 4824 - 46f2: 286f cmp r0, #111 ; 0x6f - 46f4: f000 80c7 beq.w 4886 - 46f8: 2870 cmp r0, #112 ; 0x70 - 46fa: d1bf bne.n 467c + 4740: 2869 cmp r0, #105 ; 0x69 + 4742: f000 808e beq.w 4862 + 4746: d970 bls.n 482a + 4748: 2873 cmp r0, #115 ; 0x73 + 474a: f000 80dd beq.w 4908 + 474e: f200 8099 bhi.w 4884 + 4752: 286f cmp r0, #111 ; 0x6f + 4754: f000 80c7 beq.w 48e6 + 4758: 2870 cmp r0, #112 ; 0x70 + 475a: d1bf bne.n 46dc p.base = 8; ui2a(intarg(lng, 0, &va), &p); written += putchw(putp, &p); break; case 'p': v = va_arg(va, void *); - 46fc: 9b00 ldr r3, [sp, #0] - 46fe: 1d1a adds r2, r3, #4 - 4700: 9200 str r2, [sp, #0] - 4702: 6818 ldr r0, [r3, #0] + 475c: 9b00 ldr r3, [sp, #0] + 475e: 1d1a adds r2, r3, #4 + 4760: 9200 str r2, [sp, #0] + 4762: 6818 ldr r0, [r3, #0] p.base = 16; - 4704: 2310 movs r3, #16 - 4706: f88d 3023 strb.w r3, [sp, #35] ; 0x23 + 4764: 2310 movs r3, #16 + 4766: f88d 3023 strb.w r3, [sp, #35] ; 0x23 ui2a((uintptr_t)v, &p); - 470a: aa08 add r2, sp, #32 - 470c: 2100 movs r1, #0 - 470e: f7ff fe35 bl 437c + 476a: aa08 add r2, sp, #32 + 476c: 2100 movs r1, #0 + 476e: f7ff fe35 bl 43dc p.width = 2 * sizeof(void*); - 4712: 2308 movs r3, #8 - 4714: f88d 3020 strb.w r3, [sp, #32] + 4772: 2308 movs r3, #8 + 4774: f88d 3020 strb.w r3, [sp, #32] p.lz = 1; - 4718: 2301 movs r3, #1 - 471a: f88d 3021 strb.w r3, [sp, #33] ; 0x21 + 4778: 2301 movs r3, #1 + 477a: f88d 3021 strb.w r3, [sp, #33] ; 0x21 written += putf(putp, '0'); - 471e: 2130 movs r1, #48 ; 0x30 - 4720: 4628 mov r0, r5 - 4722: f7ff fece bl 44c2 - 4726: 4404 add r4, r0 + 477e: 2130 movs r1, #48 ; 0x30 + 4780: 4628 mov r0, r5 + 4782: f7ff fece bl 4522 + 4786: 4404 add r4, r0 written += putf(putp, 'x'); - 4728: 2178 movs r1, #120 ; 0x78 - 472a: 4628 mov r0, r5 - 472c: f7ff fec9 bl 44c2 - 4730: 4404 add r4, r0 + 4788: 2178 movs r1, #120 ; 0x78 + 478a: 4628 mov r0, r5 + 478c: f7ff fec9 bl 4522 + 4790: 4404 add r4, r0 written += putchw(putp, &p); - 4732: a908 add r1, sp, #32 - 4734: 4628 mov r0, r5 - 4736: f7ff fed9 bl 44ec - 473a: 4404 add r4, r0 + 4792: a908 add r1, sp, #32 + 4794: 4628 mov r0, r5 + 4796: f7ff fed9 bl 454c + 479a: 4404 add r4, r0 break; - 473c: e79e b.n 467c + 479c: e79e b.n 46dc if (!p.left) { - 473e: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 - 4742: f013 0f08 tst.w r3, #8 - 4746: d1b4 bne.n 46b2 + 479e: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 + 47a2: f013 0f08 tst.w r3, #8 + 47a6: d1b4 bne.n 4712 p.lz = 1; - 4748: 2301 movs r3, #1 - 474a: f88d 3021 strb.w r3, [sp, #33] ; 0x21 + 47a8: 2301 movs r3, #1 + 47aa: f88d 3021 strb.w r3, [sp, #33] ; 0x21 continue; - 474e: e7b0 b.n 46b2 + 47ae: e7b0 b.n 4712 p.alt = 1; - 4750: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 - 4754: f043 0302 orr.w r3, r3, #2 - 4758: f88d 3022 strb.w r3, [sp, #34] ; 0x22 + 47b0: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 + 47b4: f043 0302 orr.w r3, r3, #2 + 47b8: f88d 3022 strb.w r3, [sp, #34] ; 0x22 continue; - 475c: e7a9 b.n 46b2 + 47bc: e7a9 b.n 4712 p.left = 1; - 475e: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 - 4762: f043 0308 orr.w r3, r3, #8 - 4766: f88d 3022 strb.w r3, [sp, #34] ; 0x22 + 47be: f89d 3022 ldrb.w r3, [sp, #34] ; 0x22 + 47c2: f043 0308 orr.w r3, r3, #8 + 47c6: f88d 3022 strb.w r3, [sp, #34] ; 0x22 p.lz = 0; - 476a: 2300 movs r3, #0 - 476c: f88d 3021 strb.w r3, [sp, #33] ; 0x21 + 47ca: 2300 movs r3, #0 + 47cc: f88d 3021 strb.w r3, [sp, #33] ; 0x21 continue; - 4770: e79f b.n 46b2 + 47d0: e79f b.n 4712 i = intarg(0, 1, &va); - 4772: 466a mov r2, sp - 4774: 2101 movs r1, #1 - 4776: 2000 movs r0, #0 - 4778: f7ff ff46 bl 4608 + 47d2: 466a mov r2, sp + 47d4: 2101 movs r1, #1 + 47d6: 2000 movs r0, #0 + 47d8: f7ff ff46 bl 4668 if (i > UCHAR_MAX) { - 477c: 28ff cmp r0, #255 ; 0xff - 477e: dd07 ble.n 4790 + 47dc: 28ff cmp r0, #255 ; 0xff + 47de: dd07 ble.n 47f0 p.width = UCHAR_MAX; - 4780: 23ff movs r3, #255 ; 0xff - 4782: f88d 3020 strb.w r3, [sp, #32] + 47e0: 23ff movs r3, #255 ; 0xff + 47e2: f88d 3020 strb.w r3, [sp, #32] ch = *(fmt++); - 4786: 9b01 ldr r3, [sp, #4] - 4788: 1c5a adds r2, r3, #1 - 478a: 9201 str r2, [sp, #4] - 478c: 7818 ldrb r0, [r3, #0] - 478e: e7a2 b.n 46d6 + 47e6: 9b01 ldr r3, [sp, #4] + 47e8: 1c5a adds r2, r3, #1 + 47ea: 9201 str r2, [sp, #4] + 47ec: 7818 ldrb r0, [r3, #0] + 47ee: e7a2 b.n 4736 } else if (i > 0) { - 4790: 2800 cmp r0, #0 - 4792: ddf8 ble.n 4786 + 47f0: 2800 cmp r0, #0 + 47f2: ddf8 ble.n 47e6 p.width = i; - 4794: f88d 0020 strb.w r0, [sp, #32] - 4798: e7f5 b.n 4786 + 47f4: f88d 0020 strb.w r0, [sp, #32] + 47f8: e7f5 b.n 47e6 ch = a2i(ch, &fmt, 10, &(p.width)); - 479a: ab08 add r3, sp, #32 - 479c: 220a movs r2, #10 - 479e: a901 add r1, sp, #4 - 47a0: f7ff fe74 bl 448c - 47a4: e797 b.n 46d6 + 47fa: ab08 add r3, sp, #32 + 47fc: 220a movs r2, #10 + 47fe: a901 add r1, sp, #4 + 4800: f7ff fe74 bl 44ec + 4804: e797 b.n 4736 ch = *(fmt++); - 47a6: 9b01 ldr r3, [sp, #4] - 47a8: 1c5a adds r2, r3, #1 - 47aa: 9201 str r2, [sp, #4] - 47ac: 7818 ldrb r0, [r3, #0] + 4806: 9b01 ldr r3, [sp, #4] + 4808: 1c5a adds r2, r3, #1 + 480a: 9201 str r2, [sp, #4] + 480c: 7818 ldrb r0, [r3, #0] if (ch == 'l') { - 47ae: 286c cmp r0, #108 ; 0x6c - 47b0: d001 beq.n 47b6 + 480e: 286c cmp r0, #108 ; 0x6c + 4810: d001 beq.n 4816 lng = 1; - 47b2: 2601 movs r6, #1 - 47b4: e792 b.n 46dc + 4812: 2601 movs r6, #1 + 4814: e792 b.n 473c ch = *(fmt++); - 47b6: 1c9a adds r2, r3, #2 - 47b8: 9201 str r2, [sp, #4] - 47ba: 7858 ldrb r0, [r3, #1] + 4816: 1c9a adds r2, r3, #2 + 4818: 9201 str r2, [sp, #4] + 481a: 7858 ldrb r0, [r3, #1] lng = 2; - 47bc: 2602 movs r6, #2 - 47be: e78d b.n 46dc + 481c: 2602 movs r6, #2 + 481e: e78d b.n 473c ch = *(fmt++); - 47c0: 9b01 ldr r3, [sp, #4] - 47c2: 1c5a adds r2, r3, #1 - 47c4: 9201 str r2, [sp, #4] - 47c6: 7818 ldrb r0, [r3, #0] - 47c8: e78a b.n 46e0 + 4820: 9b01 ldr r3, [sp, #4] + 4822: 1c5a adds r2, r3, #1 + 4824: 9201 str r2, [sp, #4] + 4826: 7818 ldrb r0, [r3, #0] + 4828: e78a b.n 4740 switch (ch) { - 47ca: 2858 cmp r0, #88 ; 0x58 - 47cc: d040 beq.n 4850 - 47ce: d80a bhi.n 47e6 - 47d0: 2800 cmp r0, #0 - 47d2: d076 beq.n 48c2 - 47d4: 2825 cmp r0, #37 ; 0x25 - 47d6: f47f af51 bne.w 467c + 482a: 2858 cmp r0, #88 ; 0x58 + 482c: d040 beq.n 48b0 + 482e: d80a bhi.n 4846 + 4830: 2800 cmp r0, #0 + 4832: d076 beq.n 4922 + 4834: 2825 cmp r0, #37 ; 0x25 + 4836: f47f af51 bne.w 46dc /* Output the decimal part. */ written += putchw(putp, &p); break; #endif case '%': written += putf(putp, ch); - 47da: 4601 mov r1, r0 - 47dc: 4628 mov r0, r5 - 47de: f7ff fe70 bl 44c2 - 47e2: 4404 add r4, r0 + 483a: 4601 mov r1, r0 + 483c: 4628 mov r0, r5 + 483e: f7ff fe70 bl 4522 + 4842: 4404 add r4, r0 break; - 47e4: e74a b.n 467c + 4844: e74a b.n 46dc switch (ch) { - 47e6: 2863 cmp r0, #99 ; 0x63 - 47e8: d108 bne.n 47fc + 4846: 2863 cmp r0, #99 ; 0x63 + 4848: d108 bne.n 485c written += putf(putp, (char)(va_arg(va, int))); - 47ea: 9b00 ldr r3, [sp, #0] - 47ec: 1d1a adds r2, r3, #4 - 47ee: 9200 str r2, [sp, #0] - 47f0: 7819 ldrb r1, [r3, #0] - 47f2: 4628 mov r0, r5 - 47f4: f7ff fe65 bl 44c2 - 47f8: 4404 add r4, r0 + 484a: 9b00 ldr r3, [sp, #0] + 484c: 1d1a adds r2, r3, #4 + 484e: 9200 str r2, [sp, #0] + 4850: 7819 ldrb r1, [r3, #0] + 4852: 4628 mov r0, r5 + 4854: f7ff fe65 bl 4522 + 4858: 4404 add r4, r0 break; - 47fa: e73f b.n 467c + 485a: e73f b.n 46dc switch (ch) { - 47fc: 2864 cmp r0, #100 ; 0x64 - 47fe: f47f af3d bne.w 467c + 485c: 2864 cmp r0, #100 ; 0x64 + 485e: f47f af3d bne.w 46dc p.base = 10; - 4802: 230a movs r3, #10 - 4804: f88d 3023 strb.w r3, [sp, #35] ; 0x23 + 4862: 230a movs r3, #10 + 4864: f88d 3023 strb.w r3, [sp, #35] ; 0x23 i2a(intarg(lng, 1, &va), &p); - 4808: 466a mov r2, sp - 480a: 2101 movs r1, #1 - 480c: 4630 mov r0, r6 - 480e: f7ff fefb bl 4608 - 4812: aa08 add r2, sp, #32 - 4814: f7ff fe12 bl 443c + 4868: 466a mov r2, sp + 486a: 2101 movs r1, #1 + 486c: 4630 mov r0, r6 + 486e: f7ff fefb bl 4668 + 4872: aa08 add r2, sp, #32 + 4874: f7ff fe12 bl 449c written += putchw(putp, &p); - 4818: a908 add r1, sp, #32 - 481a: 4628 mov r0, r5 - 481c: f7ff fe66 bl 44ec - 4820: 4404 add r4, r0 + 4878: a908 add r1, sp, #32 + 487a: 4628 mov r0, r5 + 487c: f7ff fe66 bl 454c + 4880: 4404 add r4, r0 break; - 4822: e72b b.n 467c + 4882: e72b b.n 46dc switch (ch) { - 4824: 2875 cmp r0, #117 ; 0x75 - 4826: d110 bne.n 484a + 4884: 2875 cmp r0, #117 ; 0x75 + 4886: d110 bne.n 48aa p.base = 10; - 4828: 230a movs r3, #10 - 482a: f88d 3023 strb.w r3, [sp, #35] ; 0x23 + 4888: 230a movs r3, #10 + 488a: f88d 3023 strb.w r3, [sp, #35] ; 0x23 ui2a(intarg(lng, 0, &va), &p); - 482e: 466a mov r2, sp - 4830: 2100 movs r1, #0 - 4832: 4630 mov r0, r6 - 4834: f7ff fee8 bl 4608 - 4838: aa08 add r2, sp, #32 - 483a: f7ff fd9f bl 437c + 488e: 466a mov r2, sp + 4890: 2100 movs r1, #0 + 4892: 4630 mov r0, r6 + 4894: f7ff fee8 bl 4668 + 4898: aa08 add r2, sp, #32 + 489a: f7ff fd9f bl 43dc written += putchw(putp, &p); - 483e: a908 add r1, sp, #32 - 4840: 4628 mov r0, r5 - 4842: f7ff fe53 bl 44ec - 4846: 4404 add r4, r0 + 489e: a908 add r1, sp, #32 + 48a0: 4628 mov r0, r5 + 48a2: f7ff fe53 bl 454c + 48a6: 4404 add r4, r0 break; - 4848: e718 b.n 467c + 48a8: e718 b.n 46dc switch (ch) { - 484a: 2878 cmp r0, #120 ; 0x78 - 484c: f47f af16 bne.w 467c + 48aa: 2878 cmp r0, #120 ; 0x78 + 48ac: f47f af16 bne.w 46dc p.base = 16; - 4850: 2310 movs r3, #16 - 4852: f88d 3023 strb.w r3, [sp, #35] ; 0x23 + 48b0: 2310 movs r3, #16 + 48b2: f88d 3023 strb.w r3, [sp, #35] ; 0x23 p.uc = (ch == 'X'); - 4856: 2858 cmp r0, #88 ; 0x58 - 4858: bf14 ite ne - 485a: 2300 movne r3, #0 - 485c: 2301 moveq r3, #1 - 485e: f89d 2022 ldrb.w r2, [sp, #34] ; 0x22 - 4862: f363 0282 bfi r2, r3, #2, #1 - 4866: f88d 2022 strb.w r2, [sp, #34] ; 0x22 + 48b6: 2858 cmp r0, #88 ; 0x58 + 48b8: bf14 ite ne + 48ba: 2300 movne r3, #0 + 48bc: 2301 moveq r3, #1 + 48be: f89d 2022 ldrb.w r2, [sp, #34] ; 0x22 + 48c2: f363 0282 bfi r2, r3, #2, #1 + 48c6: f88d 2022 strb.w r2, [sp, #34] ; 0x22 ui2a(intarg(lng, 0, &va), &p); - 486a: 466a mov r2, sp - 486c: 2100 movs r1, #0 - 486e: 4630 mov r0, r6 - 4870: f7ff feca bl 4608 - 4874: aa08 add r2, sp, #32 - 4876: f7ff fd81 bl 437c + 48ca: 466a mov r2, sp + 48cc: 2100 movs r1, #0 + 48ce: 4630 mov r0, r6 + 48d0: f7ff feca bl 4668 + 48d4: aa08 add r2, sp, #32 + 48d6: f7ff fd81 bl 43dc written += putchw(putp, &p); - 487a: a908 add r1, sp, #32 - 487c: 4628 mov r0, r5 - 487e: f7ff fe35 bl 44ec - 4882: 4404 add r4, r0 + 48da: a908 add r1, sp, #32 + 48dc: 4628 mov r0, r5 + 48de: f7ff fe35 bl 454c + 48e2: 4404 add r4, r0 break; - 4884: e6fa b.n 467c + 48e4: e6fa b.n 46dc p.base = 8; - 4886: 2308 movs r3, #8 - 4888: f88d 3023 strb.w r3, [sp, #35] ; 0x23 + 48e6: 2308 movs r3, #8 + 48e8: f88d 3023 strb.w r3, [sp, #35] ; 0x23 ui2a(intarg(lng, 0, &va), &p); - 488c: 466a mov r2, sp - 488e: 2100 movs r1, #0 - 4890: 4630 mov r0, r6 - 4892: f7ff feb9 bl 4608 - 4896: aa08 add r2, sp, #32 - 4898: f7ff fd70 bl 437c + 48ec: 466a mov r2, sp + 48ee: 2100 movs r1, #0 + 48f0: 4630 mov r0, r6 + 48f2: f7ff feb9 bl 4668 + 48f6: aa08 add r2, sp, #32 + 48f8: f7ff fd70 bl 43dc written += putchw(putp, &p); - 489c: a908 add r1, sp, #32 - 489e: 4628 mov r0, r5 - 48a0: f7ff fe24 bl 44ec - 48a4: 4404 add r4, r0 + 48fc: a908 add r1, sp, #32 + 48fe: 4628 mov r0, r5 + 4900: f7ff fe24 bl 454c + 4904: 4404 add r4, r0 break; - 48a6: e6e9 b.n 467c + 4906: e6e9 b.n 46dc p.bf = va_arg(va, char *); - 48a8: 9b00 ldr r3, [sp, #0] - 48aa: 1d1a adds r2, r3, #4 - 48ac: 9200 str r2, [sp, #0] - 48ae: 681b ldr r3, [r3, #0] - 48b0: 9309 str r3, [sp, #36] ; 0x24 + 4908: 9b00 ldr r3, [sp, #0] + 490a: 1d1a adds r2, r3, #4 + 490c: 9200 str r2, [sp, #0] + 490e: 681b ldr r3, [r3, #0] + 4910: 9309 str r3, [sp, #36] ; 0x24 written += putchw(putp, &p); - 48b2: a908 add r1, sp, #32 - 48b4: 4628 mov r0, r5 - 48b6: f7ff fe19 bl 44ec - 48ba: 4404 add r4, r0 + 4912: a908 add r1, sp, #32 + 4914: 4628 mov r0, r5 + 4916: f7ff fe19 bl 454c + 491a: 4404 add r4, r0 p.bf = bf; - 48bc: ab02 add r3, sp, #8 - 48be: 9309 str r3, [sp, #36] ; 0x24 + 491c: ab02 add r3, sp, #8 + 491e: 9309 str r3, [sp, #36] ; 0x24 break; - 48c0: e6dc b.n 467c + 4920: e6dc b.n 46dc } } abort:; return written; } - 48c2: 4620 mov r0, r4 - 48c4: b00a add sp, #40 ; 0x28 - 48c6: bd70 pop {r4, r5, r6, pc} + 4922: 4620 mov r0, r4 + 4924: b00a add sp, #40 ; 0x28 + 4926: bd70 pop {r4, r5, r6, pc} -000048c8 : +00004928 : int vfprintf(FILE *f, const char *fmt, va_list va) { - 48c8: b508 push {r3, lr} + 4928: b508 push {r3, lr} return tfp_format(f, fmt, va); - 48ca: f7ff fecf bl 466c + 492a: f7ff fecf bl 46cc } - 48ce: bd08 pop {r3, pc} + 492e: bd08 pop {r3, pc} -000048d0 : +00004930 : va_end(va); return rv; } int printf(const char *fmt, ...) { - 48d0: b40f push {r0, r1, r2, r3} - 48d2: b500 push {lr} - 48d4: b083 sub sp, #12 - 48d6: aa04 add r2, sp, #16 - 48d8: f852 1b04 ldr.w r1, [r2], #4 + 4930: b40f push {r0, r1, r2, r3} + 4932: b500 push {lr} + 4934: b083 sub sp, #12 + 4936: aa04 add r2, sp, #16 + 4938: f852 1b04 ldr.w r1, [r2], #4 va_list va; va_start(va, fmt); - 48dc: 9201 str r2, [sp, #4] + 493c: 9201 str r2, [sp, #4] int rv = vfprintf(stdout, fmt, va); - 48de: 4b04 ldr r3, [pc, #16] ; (48f0 ) - 48e0: 6818 ldr r0, [r3, #0] - 48e2: f7ff fff1 bl 48c8 + 493e: 4b04 ldr r3, [pc, #16] ; (4950 ) + 4940: 6818 ldr r0, [r3, #0] + 4942: f7ff fff1 bl 4928 va_end(va); return rv; } - 48e6: b003 add sp, #12 - 48e8: f85d eb04 ldr.w lr, [sp], #4 - 48ec: b004 add sp, #16 - 48ee: 4770 bx lr - 48f0: 000057f8 .word 0x000057f8 + 4946: b003 add sp, #12 + 4948: f85d eb04 ldr.w lr, [sp], #4 + 494c: b004 add sp, #16 + 494e: 4770 bx lr + 4950: 000058a0 .word 0x000058a0 -000048f4 : +00004954 : #include #include int vprintf(const char *format, va_list ap) { - 48f4: b508 push {r3, lr} + 4954: b508 push {r3, lr} return vfprintf(stdout, format, ap); - 48f6: 460a mov r2, r1 - 48f8: 4601 mov r1, r0 - 48fa: 4b02 ldr r3, [pc, #8] ; (4904 ) - 48fc: 6818 ldr r0, [r3, #0] - 48fe: f7ff ffe3 bl 48c8 + 4956: 460a mov r2, r1 + 4958: 4601 mov r1, r0 + 495a: 4b02 ldr r3, [pc, #8] ; (4964 ) + 495c: 6818 ldr r0, [r3, #0] + 495e: f7ff ffe3 bl 4928 } - 4902: bd08 pop {r3, pc} - 4904: 000057f8 .word 0x000057f8 + 4962: bd08 pop {r3, pc} + 4964: 000058a0 .word 0x000058a0 -00004908 : +00004968 : * @return 0 on success; nonzero on failure. */ static int flash_map_read_mfg(int max_areas, struct flash_area *out_areas, int *out_num_areas) { - 4908: b570 push {r4, r5, r6, lr} - 490a: b086 sub sp, #24 - 490c: 4605 mov r5, r0 - 490e: 460e mov r6, r1 - 4910: 4614 mov r4, r2 + 4968: b570 push {r4, r5, r6, lr} + 496a: b086 sub sp, #24 + 496c: 4605 mov r5, r0 + 496e: 460e mov r6, r1 + 4970: 4614 mov r4, r2 struct mfg_meta_flash_area meta_flash_area; struct mfg_reader reader; struct flash_area *fap; int rc; *out_num_areas = 0; - 4912: 2300 movs r3, #0 - 4914: 6013 str r3, [r2, #0] + 4972: 2300 movs r3, #0 + 4974: 6013 str r3, [r2, #0] /* Ensure manufacturing meta region has been located in flash. */ mfg_init(); - 4916: f000 fa17 bl 4d48 + 4976: f000 fa17 bl 4da8 mfg_open(&reader); - 491a: a801 add r0, sp, #4 - 491c: f000 fa26 bl 4d6c + 497a: a801 add r0, sp, #4 + 497c: f000 fa26 bl 4dcc while (1) { if (*out_num_areas >= max_areas) { - 4920: 6823 ldr r3, [r4, #0] - 4922: 42ab cmp r3, r5 - 4924: da29 bge.n 497a + 4980: 6823 ldr r3, [r4, #0] + 4982: 42ab cmp r3, r5 + 4984: da29 bge.n 49da return -1; } rc = mfg_seek_next_with_type(&reader, MFG_META_TLV_TYPE_FLASH_AREA); - 4926: 2102 movs r1, #2 - 4928: a801 add r0, sp, #4 - 492a: f000 f9f6 bl 4d1a - 492e: 4603 mov r3, r0 + 4986: 2102 movs r1, #2 + 4988: a801 add r0, sp, #4 + 498a: f000 f9f6 bl 4d7a + 498e: 4603 mov r3, r0 switch (rc) { - 4930: f110 0f0f cmn.w r0, #15 - 4934: d003 beq.n 493e - 4936: b120 cbz r0, 4942 + 4990: f110 0f0f cmn.w r0, #15 + 4994: d003 beq.n 499e + 4996: b120 cbz r0, 49a2 fap->fa_off = meta_flash_area.offset; fap->fa_size = meta_flash_area.size; (*out_num_areas)++; } } - 4938: 4618 mov r0, r3 - 493a: b006 add sp, #24 - 493c: bd70 pop {r4, r5, r6, pc} + 4998: 4618 mov r0, r3 + 499a: b006 add sp, #24 + 499c: bd70 pop {r4, r5, r6, pc} return 0; - 493e: 2300 movs r3, #0 - 4940: e7fa b.n 4938 + 499e: 2300 movs r3, #0 + 49a0: e7fa b.n 4998 rc = mfg_read_tlv_flash_area(&reader, &meta_flash_area); - 4942: a903 add r1, sp, #12 - 4944: a801 add r0, sp, #4 - 4946: f000 f9f5 bl 4d34 + 49a2: a903 add r1, sp, #12 + 49a4: a801 add r0, sp, #4 + 49a6: f000 f9f5 bl 4d94 if (rc != 0) { - 494a: 4603 mov r3, r0 - 494c: 2800 cmp r0, #0 - 494e: d1f3 bne.n 4938 + 49aa: 4603 mov r3, r0 + 49ac: 2800 cmp r0, #0 + 49ae: d1f3 bne.n 4998 fap = out_areas + *out_num_areas; - 4950: 6823 ldr r3, [r4, #0] - 4952: eb03 0343 add.w r3, r3, r3, lsl #1 - 4956: 009a lsls r2, r3, #2 - 4958: 18b3 adds r3, r6, r2 + 49b0: 6823 ldr r3, [r4, #0] + 49b2: eb03 0343 add.w r3, r3, r3, lsl #1 + 49b6: 009a lsls r2, r3, #2 + 49b8: 18b3 adds r3, r6, r2 fap->fa_id = meta_flash_area.area_id; - 495a: f89d 100c ldrb.w r1, [sp, #12] - 495e: 54b1 strb r1, [r6, r2] + 49ba: f89d 100c ldrb.w r1, [sp, #12] + 49be: 54b1 strb r1, [r6, r2] fap->fa_device_id = meta_flash_area.device_id; - 4960: f89d 200d ldrb.w r2, [sp, #13] - 4964: 705a strb r2, [r3, #1] + 49c0: f89d 200d ldrb.w r2, [sp, #13] + 49c4: 705a strb r2, [r3, #1] fap->fa_off = meta_flash_area.offset; - 4966: f8dd 200e ldr.w r2, [sp, #14] - 496a: 605a str r2, [r3, #4] + 49c6: f8dd 200e ldr.w r2, [sp, #14] + 49ca: 605a str r2, [r3, #4] fap->fa_size = meta_flash_area.size; - 496c: f8dd 2012 ldr.w r2, [sp, #18] - 4970: 609a str r2, [r3, #8] + 49cc: f8dd 2012 ldr.w r2, [sp, #18] + 49d0: 609a str r2, [r3, #8] (*out_num_areas)++; - 4972: 6823 ldr r3, [r4, #0] - 4974: 3301 adds r3, #1 - 4976: 6023 str r3, [r4, #0] + 49d2: 6823 ldr r3, [r4, #0] + 49d4: 3301 adds r3, #1 + 49d6: 6023 str r3, [r4, #0] if (*out_num_areas >= max_areas) { - 4978: e7d2 b.n 4920 + 49d8: e7d2 b.n 4980 return -1; - 497a: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 497e: e7db b.n 4938 + 49da: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 49de: e7db b.n 4998 -00004980 : +000049e0 : { - 4980: b430 push {r4, r5} + 49e0: b430 push {r4, r5} if (flash_map == NULL) { - 4982: 4b0d ldr r3, [pc, #52] ; (49b8 ) - 4984: 681d ldr r5, [r3, #0] - 4986: b1a5 cbz r5, 49b2 + 49e2: 4b0d ldr r3, [pc, #52] ; (4a18 ) + 49e4: 681d ldr r5, [r3, #0] + 49e6: b1a5 cbz r5, 4a12 for (i = 0; i < flash_map_entries; i++) { - 4988: 2300 movs r3, #0 - 498a: 4a0c ldr r2, [pc, #48] ; (49bc ) - 498c: 6812 ldr r2, [r2, #0] - 498e: 429a cmp r2, r3 - 4990: dd0b ble.n 49aa + 49e8: 2300 movs r3, #0 + 49ea: 4a0c ldr r2, [pc, #48] ; (4a1c ) + 49ec: 6812 ldr r2, [r2, #0] + 49ee: 429a cmp r2, r3 + 49f0: dd0b ble.n 4a0a area = flash_map + i; - 4992: eb03 0443 add.w r4, r3, r3, lsl #1 - 4996: 00a2 lsls r2, r4, #2 - 4998: 18ac adds r4, r5, r2 + 49f2: eb03 0443 add.w r4, r3, r3, lsl #1 + 49f6: 00a2 lsls r2, r4, #2 + 49f8: 18ac adds r4, r5, r2 if (area->fa_id == id) { - 499a: 5caa ldrb r2, [r5, r2] - 499c: 4282 cmp r2, r0 - 499e: d001 beq.n 49a4 + 49fa: 5caa ldrb r2, [r5, r2] + 49fc: 4282 cmp r2, r0 + 49fe: d001 beq.n 4a04 for (i = 0; i < flash_map_entries; i++) { - 49a0: 3301 adds r3, #1 - 49a2: e7f2 b.n 498a + 4a00: 3301 adds r3, #1 + 4a02: e7f2 b.n 49ea *fap = area; - 49a4: 600c str r4, [r1, #0] + 4a04: 600c str r4, [r1, #0] return 0; - 49a6: 2000 movs r0, #0 - 49a8: e001 b.n 49ae + 4a06: 2000 movs r0, #0 + 4a08: e001 b.n 4a0e return SYS_ENOENT; - 49aa: f06f 0003 mvn.w r0, #3 + 4a0a: f06f 0003 mvn.w r0, #3 } - 49ae: bc30 pop {r4, r5} - 49b0: 4770 bx lr + 4a0e: bc30 pop {r4, r5} + 4a10: 4770 bx lr return SYS_EACCES; - 49b2: f06f 0006 mvn.w r0, #6 - 49b6: e7fa b.n 49ae - 49b8: 2000641c .word 0x2000641c - 49bc: 20006420 .word 0x20006420 + 4a12: f06f 0006 mvn.w r0, #6 + 4a16: e7fa b.n 4a0e + 4a18: 2000641c .word 0x2000641c + 4a1c: 20006420 .word 0x20006420 -000049c0 : +00004a20 : { - 49c0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 49c4: b084 sub sp, #16 - 49c6: 460f mov r7, r1 - 49c8: 4616 mov r6, r2 + 4a20: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 4a24: b084 sub sp, #16 + 4a26: 460f mov r7, r1 + 4a28: 4616 mov r6, r2 rc = flash_area_open(id, &fa); - 49ca: fa5f f980 uxtb.w r9, r0 - 49ce: a903 add r1, sp, #12 - 49d0: 4648 mov r0, r9 - 49d2: f7ff ffd5 bl 4980 + 4a2a: fa5f f980 uxtb.w r9, r0 + 4a2e: a903 add r1, sp, #12 + 4a30: 4648 mov r0, r9 + 4a32: f7ff ffd5 bl 49e0 if (rc != 0) { - 49d6: 4680 mov r8, r0 - 49d8: b118 cbz r0, 49e2 + 4a36: 4680 mov r8, r0 + 4a38: b118 cbz r0, 4a42 } - 49da: 4640 mov r0, r8 - 49dc: b004 add sp, #16 - 49de: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 4a3a: 4640 mov r0, r8 + 4a3c: b004 add sp, #16 + 4a3e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} *cnt = 0; - 49e2: 2300 movs r3, #0 - 49e4: 603b str r3, [r7, #0] + 4a42: 2300 movs r3, #0 + 4a44: 603b str r3, [r7, #0] hf = hal_bsp_flash_dev(fa->fa_device_id); - 49e6: 9b03 ldr r3, [sp, #12] - 49e8: 7858 ldrb r0, [r3, #1] - 49ea: f7fb fe35 bl 658 - 49ee: 4605 mov r5, r0 + 4a46: 9b03 ldr r3, [sp, #12] + 4a48: 7858 ldrb r0, [r3, #1] + 4a4a: f7fb fe05 bl 658 + 4a4e: 4605 mov r5, r0 for (i = 0; i < hf->hf_sector_cnt; i++) { - 49f0: 4644 mov r4, r8 - 49f2: e003 b.n 49fc + 4a50: 4644 mov r4, r8 + 4a52: e003 b.n 4a5c (*cnt)++; - 49f4: 683b ldr r3, [r7, #0] - 49f6: 3301 adds r3, #1 - 49f8: 603b str r3, [r7, #0] + 4a54: 683b ldr r3, [r7, #0] + 4a56: 3301 adds r3, #1 + 4a58: 603b str r3, [r7, #0] for (i = 0; i < hf->hf_sector_cnt; i++) { - 49fa: 3401 adds r4, #1 - 49fc: 68eb ldr r3, [r5, #12] - 49fe: 42a3 cmp r3, r4 - 4a00: ddeb ble.n 49da + 4a5a: 3401 adds r4, #1 + 4a5c: 68eb ldr r3, [r5, #12] + 4a5e: 42a3 cmp r3, r4 + 4a60: ddeb ble.n 4a3a hf->hf_itf->hff_sector_info(hf, i, &start, &size); - 4a02: 682b ldr r3, [r5, #0] - 4a04: f8d3 a00c ldr.w sl, [r3, #12] - 4a08: ab01 add r3, sp, #4 - 4a0a: aa02 add r2, sp, #8 - 4a0c: 4621 mov r1, r4 - 4a0e: 4628 mov r0, r5 - 4a10: 47d0 blx sl + 4a62: 682b ldr r3, [r5, #0] + 4a64: f8d3 a00c ldr.w sl, [r3, #12] + 4a68: ab01 add r3, sp, #4 + 4a6a: aa02 add r2, sp, #8 + 4a6c: 4621 mov r1, r4 + 4a6e: 4628 mov r0, r5 + 4a70: 47d0 blx sl if (start >= fa->fa_off && start < fa->fa_off + fa->fa_size) { - 4a12: 9903 ldr r1, [sp, #12] - 4a14: 684b ldr r3, [r1, #4] - 4a16: 9a02 ldr r2, [sp, #8] - 4a18: 4293 cmp r3, r2 - 4a1a: d8ee bhi.n 49fa - 4a1c: 6889 ldr r1, [r1, #8] - 4a1e: 440b add r3, r1 - 4a20: 429a cmp r2, r3 - 4a22: d2ea bcs.n 49fa + 4a72: 9903 ldr r1, [sp, #12] + 4a74: 684b ldr r3, [r1, #4] + 4a76: 9a02 ldr r2, [sp, #8] + 4a78: 4293 cmp r3, r2 + 4a7a: d8ee bhi.n 4a5a + 4a7c: 6889 ldr r1, [r1, #8] + 4a7e: 440b add r3, r1 + 4a80: 429a cmp r2, r3 + 4a82: d2ea bcs.n 4a5a if (ret) { - 4a24: 2e00 cmp r6, #0 - 4a26: d0e5 beq.n 49f4 + 4a84: 2e00 cmp r6, #0 + 4a86: d0e5 beq.n 4a54 ret->fa_id = id; - 4a28: f886 9000 strb.w r9, [r6] + 4a88: f886 9000 strb.w r9, [r6] ret->fa_device_id = fa->fa_device_id; - 4a2c: 9b03 ldr r3, [sp, #12] - 4a2e: 785b ldrb r3, [r3, #1] - 4a30: 7073 strb r3, [r6, #1] + 4a8c: 9b03 ldr r3, [sp, #12] + 4a8e: 785b ldrb r3, [r3, #1] + 4a90: 7073 strb r3, [r6, #1] ret->fa_off = start; - 4a32: 6072 str r2, [r6, #4] + 4a92: 6072 str r2, [r6, #4] ret->fa_size = size; - 4a34: 9b01 ldr r3, [sp, #4] - 4a36: 60b3 str r3, [r6, #8] + 4a94: 9b01 ldr r3, [sp, #4] + 4a96: 60b3 str r3, [r6, #8] ret++; - 4a38: 360c adds r6, #12 - 4a3a: e7db b.n 49f4 + 4a98: 360c adds r6, #12 + 4a9a: e7db b.n 4a54 -00004a3c : +00004a9c : { - 4a3c: b538 push {r3, r4, r5, lr} + 4a9c: b538 push {r3, r4, r5, lr} if (off > fa->fa_size || off + len > fa->fa_size) { - 4a3e: 6884 ldr r4, [r0, #8] - 4a40: 428c cmp r4, r1 - 4a42: d308 bcc.n 4a56 - 4a44: 18cd adds r5, r1, r3 - 4a46: 42ac cmp r4, r5 - 4a48: d308 bcc.n 4a5c + 4a9e: 6884 ldr r4, [r0, #8] + 4aa0: 428c cmp r4, r1 + 4aa2: d308 bcc.n 4ab6 + 4aa4: 18cd adds r5, r1, r3 + 4aa6: 42ac cmp r4, r5 + 4aa8: d308 bcc.n 4abc return hal_flash_read(fa->fa_device_id, fa->fa_off + off, dst, len); - 4a4a: 6844 ldr r4, [r0, #4] - 4a4c: 4421 add r1, r4 - 4a4e: 7840 ldrb r0, [r0, #1] - 4a50: f7ff fb3d bl 40ce + 4aaa: 6844 ldr r4, [r0, #4] + 4aac: 4421 add r1, r4 + 4aae: 7840 ldrb r0, [r0, #1] + 4ab0: f7ff fb3d bl 412e } - 4a54: bd38 pop {r3, r4, r5, pc} + 4ab4: bd38 pop {r3, r4, r5, pc} return -1; - 4a56: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff - 4a5a: e7fb b.n 4a54 - 4a5c: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff - 4a60: e7f8 b.n 4a54 + 4ab6: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 4aba: e7fb b.n 4ab4 + 4abc: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 4ac0: e7f8 b.n 4ab4 -00004a62 : +00004ac2 : { - 4a62: b538 push {r3, r4, r5, lr} + 4ac2: b538 push {r3, r4, r5, lr} if (off > fa->fa_size || off + len > fa->fa_size) { - 4a64: 6884 ldr r4, [r0, #8] - 4a66: 428c cmp r4, r1 - 4a68: d308 bcc.n 4a7c - 4a6a: 18cd adds r5, r1, r3 - 4a6c: 42ac cmp r4, r5 - 4a6e: d308 bcc.n 4a82 + 4ac4: 6884 ldr r4, [r0, #8] + 4ac6: 428c cmp r4, r1 + 4ac8: d308 bcc.n 4adc + 4aca: 18cd adds r5, r1, r3 + 4acc: 42ac cmp r4, r5 + 4ace: d308 bcc.n 4ae2 return hal_flash_write(fa->fa_device_id, fa->fa_off + off, - 4a70: 6844 ldr r4, [r0, #4] - 4a72: 4421 add r1, r4 - 4a74: 7840 ldrb r0, [r0, #1] - 4a76: f7ff fb55 bl 4124 + 4ad0: 6844 ldr r4, [r0, #4] + 4ad2: 4421 add r1, r4 + 4ad4: 7840 ldrb r0, [r0, #1] + 4ad6: f7ff fb55 bl 4184 } - 4a7a: bd38 pop {r3, r4, r5, pc} + 4ada: bd38 pop {r3, r4, r5, pc} return -1; - 4a7c: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff - 4a80: e7fb b.n 4a7a - 4a82: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff - 4a86: e7f8 b.n 4a7a + 4adc: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 4ae0: e7fb b.n 4ada + 4ae2: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 4ae6: e7f8 b.n 4ada -00004a88 : +00004ae8 : if (off > fa->fa_size || off + len > fa->fa_size) { - 4a88: 6883 ldr r3, [r0, #8] - 4a8a: 428b cmp r3, r1 - 4a8c: d309 bcc.n 4aa2 + 4ae8: 6883 ldr r3, [r0, #8] + 4aea: 428b cmp r3, r1 + 4aec: d309 bcc.n 4b02 { - 4a8e: b510 push {r4, lr} + 4aee: b510 push {r4, lr} if (off > fa->fa_size || off + len > fa->fa_size) { - 4a90: 188c adds r4, r1, r2 - 4a92: 42a3 cmp r3, r4 - 4a94: d308 bcc.n 4aa8 + 4af0: 188c adds r4, r1, r2 + 4af2: 42a3 cmp r3, r4 + 4af4: d308 bcc.n 4b08 return hal_flash_erase(fa->fa_device_id, fa->fa_off + off, len); - 4a96: 6843 ldr r3, [r0, #4] - 4a98: 4419 add r1, r3 - 4a9a: 7840 ldrb r0, [r0, #1] - 4a9c: f7ff fb7c bl 4198 + 4af6: 6843 ldr r3, [r0, #4] + 4af8: 4419 add r1, r3 + 4afa: 7840 ldrb r0, [r0, #1] + 4afc: f7ff fb7c bl 41f8 } - 4aa0: bd10 pop {r4, pc} + 4b00: bd10 pop {r4, pc} return -1; - 4aa2: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 4b02: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff } - 4aa6: 4770 bx lr + 4b06: 4770 bx lr return -1; - 4aa8: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff - 4aac: e7f8 b.n 4aa0 + 4b08: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 4b0c: e7f8 b.n 4b00 -00004aae : +00004b0e : { - 4aae: b508 push {r3, lr} + 4b0e: b508 push {r3, lr} return hal_flash_align(fa->fa_device_id); - 4ab0: 7840 ldrb r0, [r0, #1] - 4ab2: f7ff fafc bl 40ae + 4b10: 7840 ldrb r0, [r0, #1] + 4b12: f7ff fafc bl 410e } - 4ab6: bd08 pop {r3, pc} + 4b16: bd08 pop {r3, pc} -00004ab8 : +00004b18 : { - 4ab8: b508 push {r3, lr} + 4b18: b508 push {r3, lr} return hal_flash_erased_val(fa->fa_device_id); - 4aba: 7840 ldrb r0, [r0, #1] - 4abc: f7ff faff bl 40be + 4b1a: 7840 ldrb r0, [r0, #1] + 4b1c: f7ff faff bl 411e } - 4ac0: bd08 pop {r3, pc} + 4b20: bd08 pop {r3, pc} -00004ac2 : +00004b22 : { - 4ac2: b510 push {r4, lr} + 4b22: b510 push {r4, lr} return hal_flash_isempty(fa->fa_device_id, fa->fa_off + off, dst, len); - 4ac4: 6844 ldr r4, [r0, #4] - 4ac6: 4421 add r1, r4 - 4ac8: 7840 ldrb r0, [r0, #1] - 4aca: f7ff fbe5 bl 4298 + 4b24: 6844 ldr r4, [r0, #4] + 4b26: 4421 add r1, r4 + 4b28: 7840 ldrb r0, [r0, #1] + 4b2a: f7ff fbe5 bl 42f8 } - 4ace: bd10 pop {r4, pc} + 4b2e: bd10 pop {r4, pc} -00004ad0 : +00004b30 : void flash_map_init(void) { - 4ad0: b510 push {r4, lr} - 4ad2: b084 sub sp, #16 + 4b30: b510 push {r4, lr} + 4b32: b084 sub sp, #16 int rc; /* Ensure this function only gets called by sysinit. */ SYSINIT_ASSERT_ACTIVE(); rc = hal_flash_init(); - 4ad4: f7ff fad7 bl 4086 + 4b34: f7ff fad7 bl 40e6 SYSINIT_PANIC_ASSERT(rc == 0); - 4ad8: b138 cbz r0, 4aea - 4ada: 2000 movs r0, #0 - 4adc: 9000 str r0, [sp, #0] - 4ade: 4b0e ldr r3, [pc, #56] ; (4b18 ) - 4ae0: 681c ldr r4, [r3, #0] - 4ae2: 4603 mov r3, r0 - 4ae4: 4602 mov r2, r0 - 4ae6: 4601 mov r1, r0 - 4ae8: 47a0 blx r4 + 4b38: b138 cbz r0, 4b4a + 4b3a: 2000 movs r0, #0 + 4b3c: 9000 str r0, [sp, #0] + 4b3e: 4b0e ldr r3, [pc, #56] ; (4b78 ) + 4b40: 681c ldr r4, [r3, #0] + 4b42: 4603 mov r3, r0 + 4b44: 4602 mov r2, r0 + 4b46: 4601 mov r1, r0 + 4b48: 47a0 blx r4 * In particular, a FLASH_AREA_BOOTLOADER entry is required for the boot * MMR, as well as an entry for each extended MMR. * 2. If we fail to read the flash map from the MMRs, the system continues * to use the default flash map. */ flash_map = sysflash_map_dflt; - 4aea: 4b0c ldr r3, [pc, #48] ; (4b1c ) - 4aec: 4a0c ldr r2, [pc, #48] ; (4b20 ) - 4aee: 601a str r2, [r3, #0] + 4b4a: 4b0c ldr r3, [pc, #48] ; (4b7c ) + 4b4c: 4a0c ldr r2, [pc, #48] ; (4b80 ) + 4b4e: 601a str r2, [r3, #0] flash_map_entries = sizeof sysflash_map_dflt / sizeof sysflash_map_dflt[0]; - 4af0: 4b0c ldr r3, [pc, #48] ; (4b24 ) - 4af2: 2206 movs r2, #6 - 4af4: 601a str r2, [r3, #0] + 4b50: 4b0c ldr r3, [pc, #48] ; (4b84 ) + 4b52: 2206 movs r2, #6 + 4b54: 601a str r2, [r3, #0] /* Attempt to read the flash map from the manufacturing meta regions. On * success, use the new flash map instead of the default hardcoded one. */ rc = flash_map_read_mfg(sizeof mfg_areas / sizeof mfg_areas[0], - 4af6: aa03 add r2, sp, #12 - 4af8: 490b ldr r1, [pc, #44] ; (4b28 ) - 4afa: 200a movs r0, #10 - 4afc: f7ff ff04 bl 4908 + 4b56: aa03 add r2, sp, #12 + 4b58: 490b ldr r1, [pc, #44] ; (4b88 ) + 4b5a: 200a movs r0, #10 + 4b5c: f7ff ff04 bl 4968 mfg_areas, &num_areas); if (rc == 0 && num_areas > 0) { - 4b00: b938 cbnz r0, 4b12 - 4b02: 9b03 ldr r3, [sp, #12] - 4b04: 2b00 cmp r3, #0 - 4b06: dd04 ble.n 4b12 + 4b60: b938 cbnz r0, 4b72 + 4b62: 9b03 ldr r3, [sp, #12] + 4b64: 2b00 cmp r3, #0 + 4b66: dd04 ble.n 4b72 flash_map = mfg_areas; - 4b08: 4a04 ldr r2, [pc, #16] ; (4b1c ) - 4b0a: 4907 ldr r1, [pc, #28] ; (4b28 ) - 4b0c: 6011 str r1, [r2, #0] + 4b68: 4a04 ldr r2, [pc, #16] ; (4b7c ) + 4b6a: 4907 ldr r1, [pc, #28] ; (4b88 ) + 4b6c: 6011 str r1, [r2, #0] flash_map_entries = num_areas; - 4b0e: 4a05 ldr r2, [pc, #20] ; (4b24 ) - 4b10: 6013 str r3, [r2, #0] + 4b6e: 4a05 ldr r2, [pc, #20] ; (4b84 ) + 4b70: 6013 str r3, [r2, #0] } } - 4b12: b004 add sp, #16 - 4b14: bd10 pop {r4, pc} - 4b16: bf00 nop - 4b18: 2000014c .word 0x2000014c - 4b1c: 2000641c .word 0x2000641c - 4b20: 000057fc .word 0x000057fc - 4b24: 20006420 .word 0x20006420 - 4b28: 20006324 .word 0x20006324 + 4b72: b004 add sp, #16 + 4b74: bd10 pop {r4, pc} + 4b76: bf00 nop + 4b78: 2000014c .word 0x2000014c + 4b7c: 2000641c .word 0x2000641c + 4b80: 000058a4 .word 0x000058a4 + 4b84: 20006420 .word 0x20006420 + 4b88: 20006324 .word 0x20006324 -00004b2c : +00004b8c : #else /* LOG_FULL */ void modlog_init(void) { } - 4b2c: 4770 bx lr + 4b8c: 4770 bx lr ... -00004b30 : +00004b90 : * for reading. * Other MFG error code on failure. */ static int mfg_seek_next_aux(struct mfg_reader *reader) { - 4b30: b530 push {r4, r5, lr} - 4b32: b083 sub sp, #12 + 4b90: b530 push {r4, r5, lr} + 4b92: b083 sub sp, #12 const struct flash_area *fap; const struct mfg_mmr *mmr; int rc; if (reader->mmr_idx >= mfg_num_mmrs) { - 4b34: 7885 ldrb r5, [r0, #2] - 4b36: 4b21 ldr r3, [pc, #132] ; (4bbc ) - 4b38: 681b ldr r3, [r3, #0] - 4b3a: 429d cmp r5, r3 - 4b3c: da32 bge.n 4ba4 - 4b3e: 4604 mov r4, r0 + 4b94: 7885 ldrb r5, [r0, #2] + 4b96: 4b21 ldr r3, [pc, #132] ; (4c1c ) + 4b98: 681b ldr r3, [r3, #0] + 4b9a: 429d cmp r5, r3 + 4b9c: da32 bge.n 4c04 + 4b9e: 4604 mov r4, r0 return SYS_EINVAL; } mmr = &mfg_mmrs[reader->mmr_idx]; rc = flash_area_open(mmr->area_id, &fap); - 4b40: eb05 0245 add.w r2, r5, r5, lsl #1 - 4b44: 0093 lsls r3, r2, #2 - 4b46: a901 add r1, sp, #4 - 4b48: 4a1d ldr r2, [pc, #116] ; (4bc0 ) - 4b4a: 5cd0 ldrb r0, [r2, r3] - 4b4c: f7ff ff18 bl 4980 + 4ba0: eb05 0245 add.w r2, r5, r5, lsl #1 + 4ba4: 0093 lsls r3, r2, #2 + 4ba6: a901 add r1, sp, #4 + 4ba8: 4a1d ldr r2, [pc, #116] ; (4c20 ) + 4baa: 5cd0 ldrb r0, [r2, r3] + 4bac: f7ff ff18 bl 49e0 if (rc != 0) { - 4b50: bb58 cbnz r0, 4baa + 4bb0: bb58 cbnz r0, 4c0a return SYS_EIO; } if (reader->offset == 0) { - 4b52: 6862 ldr r2, [r4, #4] - 4b54: b9c2 cbnz r2, 4b88 + 4bb2: 6862 ldr r2, [r4, #4] + 4bb4: b9c2 cbnz r2, 4be8 /* First seek; advance to the start of the MMR. */ reader->offset = mmr->offset; - 4b56: eb05 0545 add.w r5, r5, r5, lsl #1 - 4b5a: 00aa lsls r2, r5, #2 - 4b5c: 4b18 ldr r3, [pc, #96] ; (4bc0 ) - 4b5e: 4413 add r3, r2 - 4b60: 685b ldr r3, [r3, #4] - 4b62: 6063 str r3, [r4, #4] + 4bb6: eb05 0545 add.w r5, r5, r5, lsl #1 + 4bba: 00aa lsls r2, r5, #2 + 4bbc: 4b18 ldr r3, [pc, #96] ; (4c20 ) + 4bbe: 4413 add r3, r2 + 4bc0: 685b ldr r3, [r3, #4] + 4bc2: 6063 str r3, [r4, #4] } else { /* Follow-up seek; skip the current TLV. */ reader->offset += MFG_META_TLV_SZ + reader->cur_tlv.size; } if (reader->offset >= fap->fa_size - MFG_META_FOOTER_SZ) { - 4b64: 6861 ldr r1, [r4, #4] - 4b66: 9801 ldr r0, [sp, #4] - 4b68: 6883 ldr r3, [r0, #8] - 4b6a: 3b08 subs r3, #8 - 4b6c: 4299 cmp r1, r3 - 4b6e: d310 bcc.n 4b92 + 4bc4: 6861 ldr r1, [r4, #4] + 4bc6: 9801 ldr r0, [sp, #4] + 4bc8: 6883 ldr r3, [r0, #8] + 4bca: 3b08 subs r3, #8 + 4bcc: 4299 cmp r1, r3 + 4bce: d310 bcc.n 4bf2 /* Reached end of the MMR; advance to the next MMR if one exists. */ if (reader->mmr_idx + 1 >= mfg_num_mmrs) { - 4b70: 78a3 ldrb r3, [r4, #2] - 4b72: 1c59 adds r1, r3, #1 - 4b74: 4a11 ldr r2, [pc, #68] ; (4bbc ) - 4b76: 6812 ldr r2, [r2, #0] - 4b78: 4291 cmp r1, r2 - 4b7a: da19 bge.n 4bb0 + 4bd0: 78a3 ldrb r3, [r4, #2] + 4bd2: 1c59 adds r1, r3, #1 + 4bd4: 4a11 ldr r2, [pc, #68] ; (4c1c ) + 4bd6: 6812 ldr r2, [r2, #0] + 4bd8: 4291 cmp r1, r2 + 4bda: da19 bge.n 4c10 rc = SYS_EDONE; } else { reader->offset = 0; - 4b7c: 2200 movs r2, #0 - 4b7e: 6062 str r2, [r4, #4] + 4bdc: 2200 movs r2, #0 + 4bde: 6062 str r2, [r4, #4] reader->mmr_idx++; - 4b80: 70a1 strb r1, [r4, #2] + 4be0: 70a1 strb r1, [r4, #2] rc = SYS_EAGAIN; - 4b82: f06f 0305 mvn.w r3, #5 - 4b86: e015 b.n 4bb4 + 4be2: f06f 0305 mvn.w r3, #5 + 4be6: e015 b.n 4c14 reader->offset += MFG_META_TLV_SZ + reader->cur_tlv.size; - 4b88: 7863 ldrb r3, [r4, #1] - 4b8a: 4413 add r3, r2 - 4b8c: 3302 adds r3, #2 - 4b8e: 6063 str r3, [r4, #4] - 4b90: e7e8 b.n 4b64 + 4be8: 7863 ldrb r3, [r4, #1] + 4bea: 4413 add r3, r2 + 4bec: 3302 adds r3, #2 + 4bee: 6063 str r3, [r4, #4] + 4bf0: e7e8 b.n 4bc4 } goto done; } /* Read current TLV header. */ rc = flash_area_read(fap, reader->offset, &reader->cur_tlv, - 4b92: 2302 movs r3, #2 - 4b94: 4622 mov r2, r4 - 4b96: f7ff ff51 bl 4a3c + 4bf2: 2302 movs r3, #2 + 4bf4: 4622 mov r2, r4 + 4bf6: f7ff ff51 bl 4a9c MFG_META_TLV_SZ); if (rc != 0) { - 4b9a: 4603 mov r3, r0 - 4b9c: b150 cbz r0, 4bb4 + 4bfa: 4603 mov r3, r0 + 4bfc: b150 cbz r0, 4c14 rc = SYS_EIO; - 4b9e: f06f 0304 mvn.w r3, #4 - 4ba2: e007 b.n 4bb4 + 4bfe: f06f 0304 mvn.w r3, #4 + 4c02: e007 b.n 4c14 return SYS_EINVAL; - 4ba4: f06f 0301 mvn.w r3, #1 - 4ba8: e004 b.n 4bb4 + 4c04: f06f 0301 mvn.w r3, #1 + 4c08: e004 b.n 4c14 return SYS_EIO; - 4baa: f06f 0304 mvn.w r3, #4 - 4bae: e001 b.n 4bb4 + 4c0a: f06f 0304 mvn.w r3, #4 + 4c0e: e001 b.n 4c14 rc = SYS_EDONE; - 4bb0: f06f 030e mvn.w r3, #14 + 4c10: f06f 030e mvn.w r3, #14 } done: flash_area_close(fap); return rc; } - 4bb4: 4618 mov r0, r3 - 4bb6: b003 add sp, #12 - 4bb8: bd30 pop {r4, r5, pc} - 4bba: bf00 nop - 4bbc: 200063b8 .word 0x200063b8 - 4bc0: 200063a0 .word 0x200063a0 + 4c14: 4618 mov r0, r3 + 4c16: b003 add sp, #12 + 4c18: bd30 pop {r4, r5, pc} + 4c1a: bf00 nop + 4c1c: 200063b8 .word 0x200063b8 + 4c20: 200063a0 .word 0x200063a0 -00004bc4 : +00004c24 : /** * Reads an MMR from the end of the specified flash area. */ static int mfg_read_mmr(uint8_t area_id, struct mfg_mmr *out_mmr) { - 4bc4: b530 push {r4, r5, lr} - 4bc6: b085 sub sp, #20 - 4bc8: 4605 mov r5, r0 - 4bca: 460c mov r4, r1 + 4c24: b530 push {r4, r5, lr} + 4c26: b085 sub sp, #20 + 4c28: 4605 mov r5, r0 + 4c2a: 460c mov r4, r1 const struct flash_area *fap; struct mfg_meta_footer ftr; int rc; rc = flash_area_open(area_id, &fap); - 4bcc: a903 add r1, sp, #12 - 4bce: f7ff fed7 bl 4980 + 4c2c: a903 add r1, sp, #12 + 4c2e: f7ff fed7 bl 49e0 if (rc != 0) { - 4bd2: b9e8 cbnz r0, 4c10 + 4c32: b9e8 cbnz r0, 4c70 return SYS_EIO; } /* Read the MMR footer. */ rc = flash_area_read(fap, fap->fa_size - sizeof ftr, &ftr, sizeof ftr); - 4bd4: 9803 ldr r0, [sp, #12] - 4bd6: 6881 ldr r1, [r0, #8] - 4bd8: 2308 movs r3, #8 - 4bda: aa01 add r2, sp, #4 - 4bdc: 3908 subs r1, #8 - 4bde: f7ff ff2d bl 4a3c + 4c34: 9803 ldr r0, [sp, #12] + 4c36: 6881 ldr r1, [r0, #8] + 4c38: 2308 movs r3, #8 + 4c3a: aa01 add r2, sp, #4 + 4c3c: 3908 subs r1, #8 + 4c3e: f7ff ff2d bl 4a9c flash_area_close(fap); if (rc != 0) { - 4be2: 4601 mov r1, r0 - 4be4: b9b8 cbnz r0, 4c16 + 4c42: 4601 mov r1, r0 + 4c44: b9b8 cbnz r0, 4c76 return SYS_EIO; } if (ftr.magic != MFG_META_MAGIC) { - 4be6: 9a02 ldr r2, [sp, #8] - 4be8: 4b11 ldr r3, [pc, #68] ; (4c30 ) - 4bea: 429a cmp r2, r3 - 4bec: d116 bne.n 4c1c + 4c46: 9a02 ldr r2, [sp, #8] + 4c48: 4b11 ldr r3, [pc, #68] ; (4c90 ) + 4c4a: 429a cmp r2, r3 + 4c4c: d116 bne.n 4c7c return SYS_ENODEV; } if (ftr.version != MFG_META_VERSION) { - 4bee: f89d 3006 ldrb.w r3, [sp, #6] - 4bf2: 2b02 cmp r3, #2 - 4bf4: d115 bne.n 4c22 + 4c4e: f89d 3006 ldrb.w r3, [sp, #6] + 4c52: 2b02 cmp r3, #2 + 4c54: d115 bne.n 4c82 return SYS_ENOTSUP; } if (ftr.size > fap->fa_size) { - 4bf6: f8bd 2004 ldrh.w r2, [sp, #4] - 4bfa: 9b03 ldr r3, [sp, #12] - 4bfc: 689b ldr r3, [r3, #8] - 4bfe: 429a cmp r2, r3 - 4c00: d812 bhi.n 4c28 + 4c56: f8bd 2004 ldrh.w r2, [sp, #4] + 4c5a: 9b03 ldr r3, [sp, #12] + 4c5c: 689b ldr r3, [r3, #8] + 4c5e: 429a cmp r2, r3 + 4c60: d812 bhi.n 4c88 return SYS_ENODEV; } *out_mmr = (struct mfg_mmr) { .area_id = area_id, .offset = fap->fa_size - ftr.size, - 4c02: 1a9b subs r3, r3, r2 + 4c62: 1a9b subs r3, r3, r2 *out_mmr = (struct mfg_mmr) { - 4c04: 7025 strb r5, [r4, #0] - 4c06: 6063 str r3, [r4, #4] - 4c08: 60a2 str r2, [r4, #8] + 4c64: 7025 strb r5, [r4, #0] + 4c66: 6063 str r3, [r4, #4] + 4c68: 60a2 str r2, [r4, #8] .size = ftr.size, }; return 0; } - 4c0a: 4608 mov r0, r1 - 4c0c: b005 add sp, #20 - 4c0e: bd30 pop {r4, r5, pc} + 4c6a: 4608 mov r0, r1 + 4c6c: b005 add sp, #20 + 4c6e: bd30 pop {r4, r5, pc} return SYS_EIO; - 4c10: f06f 0104 mvn.w r1, #4 - 4c14: e7f9 b.n 4c0a + 4c70: f06f 0104 mvn.w r1, #4 + 4c74: e7f9 b.n 4c6a return SYS_EIO; - 4c16: f06f 0104 mvn.w r1, #4 - 4c1a: e7f6 b.n 4c0a + 4c76: f06f 0104 mvn.w r1, #4 + 4c7a: e7f6 b.n 4c6a return SYS_ENODEV; - 4c1c: f06f 0108 mvn.w r1, #8 - 4c20: e7f3 b.n 4c0a + 4c7c: f06f 0108 mvn.w r1, #8 + 4c80: e7f3 b.n 4c6a return SYS_ENOTSUP; - 4c22: f06f 010b mvn.w r1, #11 - 4c26: e7f0 b.n 4c0a + 4c82: f06f 010b mvn.w r1, #11 + 4c86: e7f0 b.n 4c6a return SYS_ENODEV; - 4c28: f06f 0108 mvn.w r1, #8 - 4c2c: e7ed b.n 4c0a - 4c2e: bf00 nop - 4c30: 3bb2a269 .word 0x3bb2a269 + 4c88: f06f 0108 mvn.w r1, #8 + 4c8c: e7ed b.n 4c6a + 4c8e: bf00 nop + 4c90: 3bb2a269 .word 0x3bb2a269 -00004c34 : +00004c94 : * Reads an MMR from the end of the specified flash area. On success, the * global MMR list is populated with the result for subsequent reading. */ static int mfg_read_next_mmr(uint8_t area_id) { - 4c34: b508 push {r3, lr} + 4c94: b508 push {r3, lr} int rc; int i; /* Detect if this MMR has already been read. */ for (i = 0; i < mfg_num_mmrs; i++) { - 4c36: 2300 movs r3, #0 - 4c38: 4a11 ldr r2, [pc, #68] ; (4c80 ) - 4c3a: 6812 ldr r2, [r2, #0] - 4c3c: 429a cmp r2, r3 - 4c3e: dd08 ble.n 4c52 + 4c96: 2300 movs r3, #0 + 4c98: 4a11 ldr r2, [pc, #68] ; (4ce0 ) + 4c9a: 6812 ldr r2, [r2, #0] + 4c9c: 429a cmp r2, r3 + 4c9e: dd08 ble.n 4cb2 if (mfg_mmrs[i].area_id == area_id) { - 4c40: eb03 0143 add.w r1, r3, r3, lsl #1 - 4c44: 008a lsls r2, r1, #2 - 4c46: 490f ldr r1, [pc, #60] ; (4c84 ) - 4c48: 5c8a ldrb r2, [r1, r2] - 4c4a: 4282 cmp r2, r0 - 4c4c: d011 beq.n 4c72 + 4ca0: eb03 0143 add.w r1, r3, r3, lsl #1 + 4ca4: 008a lsls r2, r1, #2 + 4ca6: 490f ldr r1, [pc, #60] ; (4ce4 ) + 4ca8: 5c8a ldrb r2, [r1, r2] + 4caa: 4282 cmp r2, r0 + 4cac: d011 beq.n 4cd2 for (i = 0; i < mfg_num_mmrs; i++) { - 4c4e: 3301 adds r3, #1 - 4c50: e7f2 b.n 4c38 + 4cae: 3301 adds r3, #1 + 4cb0: e7f2 b.n 4c98 return SYS_EALREADY; } } if (mfg_num_mmrs >= MYNEWT_VAL(MFG_MAX_MMRS)) { - 4c52: 2a01 cmp r2, #1 - 4c54: dc11 bgt.n 4c7a + 4cb2: 2a01 cmp r2, #1 + 4cb4: dc11 bgt.n 4cda return SYS_ENOMEM; } rc = mfg_read_mmr(area_id, &mfg_mmrs[mfg_num_mmrs]); - 4c56: eb02 0242 add.w r2, r2, r2, lsl #1 - 4c5a: 0093 lsls r3, r2, #2 - 4c5c: 4909 ldr r1, [pc, #36] ; (4c84 ) - 4c5e: 4419 add r1, r3 - 4c60: f7ff ffb0 bl 4bc4 + 4cb6: eb02 0242 add.w r2, r2, r2, lsl #1 + 4cba: 0093 lsls r3, r2, #2 + 4cbc: 4909 ldr r1, [pc, #36] ; (4ce4 ) + 4cbe: 4419 add r1, r3 + 4cc0: f7ff ffb0 bl 4c24 if (rc != 0) { - 4c64: 4603 mov r3, r0 - 4c66: b930 cbnz r0, 4c76 + 4cc4: 4603 mov r3, r0 + 4cc6: b930 cbnz r0, 4cd6 return rc; } mfg_num_mmrs++; - 4c68: 4905 ldr r1, [pc, #20] ; (4c80 ) - 4c6a: 680a ldr r2, [r1, #0] - 4c6c: 3201 adds r2, #1 - 4c6e: 600a str r2, [r1, #0] + 4cc8: 4905 ldr r1, [pc, #20] ; (4ce0 ) + 4cca: 680a ldr r2, [r1, #0] + 4ccc: 3201 adds r2, #1 + 4cce: 600a str r2, [r1, #0] return 0; - 4c70: e001 b.n 4c76 + 4cd0: e001 b.n 4cd6 return SYS_EALREADY; - 4c72: f06f 030a mvn.w r3, #10 + 4cd2: f06f 030a mvn.w r3, #10 } - 4c76: 4618 mov r0, r3 - 4c78: bd08 pop {r3, pc} + 4cd6: 4618 mov r0, r3 + 4cd8: bd08 pop {r3, pc} return SYS_ENOMEM; - 4c7a: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 4c7e: e7fa b.n 4c76 - 4c80: 200063b8 .word 0x200063b8 - 4c84: 200063a0 .word 0x200063a0 + 4cda: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 4cde: e7fa b.n 4cd6 + 4ce0: 200063b8 .word 0x200063b8 + 4ce4: 200063a0 .word 0x200063a0 -00004c88 : +00004ce8 : { - 4c88: b508 push {r3, lr} + 4ce8: b508 push {r3, lr} assert(reader->mmr_idx < mfg_num_mmrs); - 4c8a: 7883 ldrb r3, [r0, #2] - 4c8c: 4a0b ldr r2, [pc, #44] ; (4cbc ) - 4c8e: 6812 ldr r2, [r2, #0] - 4c90: 4293 cmp r3, r2 - 4c92: da0a bge.n 4caa + 4cea: 7883 ldrb r3, [r0, #2] + 4cec: 4a0b ldr r2, [pc, #44] ; (4d1c ) + 4cee: 6812 ldr r2, [r2, #0] + 4cf0: 4293 cmp r3, r2 + 4cf2: da0a bge.n 4d0a rc = flash_area_open(mmr->area_id, fap); - 4c94: eb03 0343 add.w r3, r3, r3, lsl #1 - 4c98: 009a lsls r2, r3, #2 - 4c9a: 4b09 ldr r3, [pc, #36] ; (4cc0 ) - 4c9c: 5c98 ldrb r0, [r3, r2] - 4c9e: f7ff fe6f bl 4980 + 4cf4: eb03 0343 add.w r3, r3, r3, lsl #1 + 4cf8: 009a lsls r2, r3, #2 + 4cfa: 4b09 ldr r3, [pc, #36] ; (4d20 ) + 4cfc: 5c98 ldrb r0, [r3, r2] + 4cfe: f7ff fe6f bl 49e0 if (rc != 0) { - 4ca2: 4603 mov r3, r0 - 4ca4: b938 cbnz r0, 4cb6 + 4d02: 4603 mov r3, r0 + 4d04: b938 cbnz r0, 4d16 } - 4ca6: 4618 mov r0, r3 - 4ca8: bd08 pop {r3, pc} + 4d06: 4618 mov r0, r3 + 4d08: bd08 pop {r3, pc} assert(reader->mmr_idx < mfg_num_mmrs); - 4caa: 2300 movs r3, #0 - 4cac: 461a mov r2, r3 - 4cae: 4619 mov r1, r3 - 4cb0: 4618 mov r0, r3 - 4cb2: f7fc fd2b bl 170c <__assert_func> + 4d0a: 2300 movs r3, #0 + 4d0c: 461a mov r2, r3 + 4d0e: 4619 mov r1, r3 + 4d10: 4618 mov r0, r3 + 4d12: f7fc fcfb bl 170c <__assert_func> return SYS_EIO; - 4cb6: f06f 0304 mvn.w r3, #4 - 4cba: e7f4 b.n 4ca6 - 4cbc: 200063b8 .word 0x200063b8 - 4cc0: 200063a0 .word 0x200063a0 - -00004cc4 : -{ - 4cc4: b570 push {r4, r5, r6, lr} - 4cc6: b082 sub sp, #8 - 4cc8: 4606 mov r6, r0 - 4cca: 460c mov r4, r1 - 4ccc: 4615 mov r5, r2 + 4d16: f06f 0304 mvn.w r3, #4 + 4d1a: e7f4 b.n 4d06 + 4d1c: 200063b8 .word 0x200063b8 + 4d20: 200063a0 .word 0x200063a0 + +00004d24 : +{ + 4d24: b570 push {r4, r5, r6, lr} + 4d26: b082 sub sp, #8 + 4d28: 4606 mov r6, r0 + 4d2a: 460c mov r4, r1 + 4d2c: 4615 mov r5, r2 rc = mfg_open_flash_area(reader, &fap); - 4cce: a901 add r1, sp, #4 - 4cd0: f7ff ffda bl 4c88 + 4d2e: a901 add r1, sp, #4 + 4d30: f7ff ffda bl 4ce8 if (rc != 0) { - 4cd4: 4603 mov r3, r0 - 4cd6: b110 cbz r0, 4cde + 4d34: 4603 mov r3, r0 + 4d36: b110 cbz r0, 4d3e } - 4cd8: 4618 mov r0, r3 - 4cda: b002 add sp, #8 - 4cdc: bd70 pop {r4, r5, r6, pc} + 4d38: 4618 mov r0, r3 + 4d3a: b002 add sp, #8 + 4d3c: bd70 pop {r4, r5, r6, pc} memset(dst, 0, max_size); - 4cde: 462a mov r2, r5 - 4ce0: 2100 movs r1, #0 - 4ce2: 4620 mov r0, r4 - 4ce4: f7fd f876 bl 1dd4 + 4d3e: 462a mov r2, r5 + 4d40: 2100 movs r1, #0 + 4d42: 4620 mov r0, r4 + 4d44: f7fd f846 bl 1dd4 read_sz = min(max_size, reader->cur_tlv.size); - 4ce8: 7873 ldrb r3, [r6, #1] + 4d48: 7873 ldrb r3, [r6, #1] rc = flash_area_read(fap, reader->offset + MFG_META_TLV_SZ, dst, read_sz); - 4cea: 6871 ldr r1, [r6, #4] - 4cec: 42ab cmp r3, r5 - 4cee: bfa8 it ge - 4cf0: 462b movge r3, r5 - 4cf2: 4622 mov r2, r4 - 4cf4: 3102 adds r1, #2 - 4cf6: 9801 ldr r0, [sp, #4] - 4cf8: f7ff fea0 bl 4a3c + 4d4a: 6871 ldr r1, [r6, #4] + 4d4c: 42ab cmp r3, r5 + 4d4e: bfa8 it ge + 4d50: 462b movge r3, r5 + 4d52: 4622 mov r2, r4 + 4d54: 3102 adds r1, #2 + 4d56: 9801 ldr r0, [sp, #4] + 4d58: f7ff fea0 bl 4a9c if (rc != 0) { - 4cfc: 4603 mov r3, r0 - 4cfe: 2800 cmp r0, #0 - 4d00: d0ea beq.n 4cd8 + 4d5c: 4603 mov r3, r0 + 4d5e: 2800 cmp r0, #0 + 4d60: d0ea beq.n 4d38 return SYS_EIO; - 4d02: f06f 0304 mvn.w r3, #4 - 4d06: e7e7 b.n 4cd8 + 4d62: f06f 0304 mvn.w r3, #4 + 4d66: e7e7 b.n 4d38 -00004d08 : +00004d68 : { - 4d08: b510 push {r4, lr} - 4d0a: 4604 mov r4, r0 + 4d68: b510 push {r4, lr} + 4d6a: 4604 mov r4, r0 rc = mfg_seek_next_aux(reader); - 4d0c: 4620 mov r0, r4 - 4d0e: f7ff ff0f bl 4b30 + 4d6c: 4620 mov r0, r4 + 4d6e: f7ff ff0f bl 4b90 } while (rc == SYS_EAGAIN); - 4d12: f110 0f06 cmn.w r0, #6 - 4d16: d0f9 beq.n 4d0c + 4d72: f110 0f06 cmn.w r0, #6 + 4d76: d0f9 beq.n 4d6c } - 4d18: bd10 pop {r4, pc} + 4d78: bd10 pop {r4, pc} -00004d1a : +00004d7a : { - 4d1a: b538 push {r3, r4, r5, lr} - 4d1c: 4604 mov r4, r0 - 4d1e: 460d mov r5, r1 + 4d7a: b538 push {r3, r4, r5, lr} + 4d7c: 4604 mov r4, r0 + 4d7e: 460d mov r5, r1 rc = mfg_seek_next(reader); - 4d20: 4620 mov r0, r4 - 4d22: f7ff fff1 bl 4d08 + 4d80: 4620 mov r0, r4 + 4d82: f7ff fff1 bl 4d68 if (rc != 0) { - 4d26: 4602 mov r2, r0 - 4d28: b910 cbnz r0, 4d30 + 4d86: 4602 mov r2, r0 + 4d88: b910 cbnz r0, 4d90 if (reader->cur_tlv.type == type) { - 4d2a: 7823 ldrb r3, [r4, #0] - 4d2c: 42ab cmp r3, r5 - 4d2e: d1f7 bne.n 4d20 + 4d8a: 7823 ldrb r3, [r4, #0] + 4d8c: 42ab cmp r3, r5 + 4d8e: d1f7 bne.n 4d80 } - 4d30: 4610 mov r0, r2 - 4d32: bd38 pop {r3, r4, r5, pc} + 4d90: 4610 mov r0, r2 + 4d92: bd38 pop {r3, r4, r5, pc} -00004d34 : +00004d94 : { - 4d34: b508 push {r3, lr} + 4d94: b508 push {r3, lr} return mfg_read_tlv_body(reader, out_mfa, sizeof *out_mfa); - 4d36: 220a movs r2, #10 - 4d38: f7ff ffc4 bl 4cc4 + 4d96: 220a movs r2, #10 + 4d98: f7ff ffc4 bl 4d24 } - 4d3c: bd08 pop {r3, pc} + 4d9c: bd08 pop {r3, pc} -00004d3e : +00004d9e : { - 4d3e: b508 push {r3, lr} + 4d9e: b508 push {r3, lr} return mfg_read_tlv_body(reader, out_mr, sizeof *out_mr); - 4d40: 2201 movs r2, #1 - 4d42: f7ff ffbf bl 4cc4 + 4da0: 2201 movs r2, #1 + 4da2: f7ff ffbf bl 4d24 } - 4d46: bd08 pop {r3, pc} + 4da6: bd08 pop {r3, pc} -00004d48 : +00004da8 : * called before any TLVs can be read. No-op if this function has already * executed successfully. */ void mfg_init(void) { - 4d48: b508 push {r3, lr} + 4da8: b508 push {r3, lr} int rc; if (mfg_initialized) { - 4d4a: 4b07 ldr r3, [pc, #28] ; (4d68 ) - 4d4c: 781b ldrb r3, [r3, #0] - 4d4e: b103 cbz r3, 4d52 + 4daa: 4b07 ldr r3, [pc, #28] ; (4dc8 ) + 4dac: 781b ldrb r3, [r3, #0] + 4dae: b103 cbz r3, 4db2 return; err: MFG_LOG(ERROR, "failed to read MMRs: rc=%d", rc); } - 4d50: bd08 pop {r3, pc} + 4db0: bd08 pop {r3, pc} mfg_initialized = true; - 4d52: 4b05 ldr r3, [pc, #20] ; (4d68 ) - 4d54: 2201 movs r2, #1 - 4d56: 701a strb r2, [r3, #0] + 4db2: 4b05 ldr r3, [pc, #20] ; (4dc8 ) + 4db4: 2201 movs r2, #1 + 4db6: 701a strb r2, [r3, #0] rc = mfg_read_next_mmr(FLASH_AREA_BOOTLOADER); - 4d58: 2000 movs r0, #0 - 4d5a: f7ff ff6b bl 4c34 + 4db8: 2000 movs r0, #0 + 4dba: f7ff ff6b bl 4c94 if (rc != 0) { - 4d5e: 2800 cmp r0, #0 - 4d60: d1f6 bne.n 4d50 + 4dbe: 2800 cmp r0, #0 + 4dc0: d1f6 bne.n 4db0 rc = mfg_read_mmr_refs(); - 4d62: f000 f80b bl 4d7c + 4dc2: f000 f80b bl 4ddc err: - 4d66: e7f3 b.n 4d50 - 4d68: 2000639c .word 0x2000639c + 4dc6: e7f3 b.n 4db0 + 4dc8: 2000639c .word 0x2000639c -00004d6c : +00004dcc : { - 4d6c: b510 push {r4, lr} - 4d6e: 4604 mov r4, r0 + 4dcc: b510 push {r4, lr} + 4dce: 4604 mov r4, r0 mfg_init(); - 4d70: f7ff ffea bl 4d48 + 4dd0: f7ff ffea bl 4da8 *out_reader = (struct mfg_reader) { 0 }; - 4d74: 2300 movs r3, #0 - 4d76: 6023 str r3, [r4, #0] - 4d78: 6063 str r3, [r4, #4] + 4dd4: 2300 movs r3, #0 + 4dd6: 6023 str r3, [r4, #0] + 4dd8: 6063 str r3, [r4, #4] } - 4d7a: bd10 pop {r4, pc} + 4dda: bd10 pop {r4, pc} -00004d7c : +00004ddc : { - 4d7c: b500 push {lr} - 4d7e: b085 sub sp, #20 + 4ddc: b500 push {lr} + 4dde: b085 sub sp, #20 mfg_open(&reader); - 4d80: a801 add r0, sp, #4 - 4d82: f7ff fff3 bl 4d6c + 4de0: a801 add r0, sp, #4 + 4de2: f7ff fff3 bl 4dcc rc = mfg_seek_next_with_type(&reader, MFG_META_TLV_TYPE_MMR_REF); - 4d86: 2104 movs r1, #4 - 4d88: eb0d 0001 add.w r0, sp, r1 - 4d8c: f7ff ffc5 bl 4d1a - 4d90: 4603 mov r3, r0 + 4de6: 2104 movs r1, #4 + 4de8: eb0d 0001 add.w r0, sp, r1 + 4dec: f7ff ffc5 bl 4d7a + 4df0: 4603 mov r3, r0 switch (rc) { - 4d92: f110 0f0f cmn.w r0, #15 - 4d96: d004 beq.n 4da2 - 4d98: b128 cbz r0, 4da6 + 4df2: f110 0f0f cmn.w r0, #15 + 4df6: d004 beq.n 4e02 + 4df8: b128 cbz r0, 4e06 } - 4d9a: 4618 mov r0, r3 - 4d9c: b005 add sp, #20 - 4d9e: f85d fb04 ldr.w pc, [sp], #4 + 4dfa: 4618 mov r0, r3 + 4dfc: b005 add sp, #20 + 4dfe: f85d fb04 ldr.w pc, [sp], #4 return 0; - 4da2: 2300 movs r3, #0 - 4da4: e7f9 b.n 4d9a + 4e02: 2300 movs r3, #0 + 4e04: e7f9 b.n 4dfa rc = mfg_read_tlv_mmr_ref(&reader, &mmr_ref); - 4da6: a903 add r1, sp, #12 - 4da8: a801 add r0, sp, #4 - 4daa: f7ff ffc8 bl 4d3e + 4e06: a903 add r1, sp, #12 + 4e08: a801 add r0, sp, #4 + 4e0a: f7ff ffc8 bl 4d9e if (rc != 0) { - 4dae: 4603 mov r3, r0 - 4db0: 2800 cmp r0, #0 - 4db2: d1f2 bne.n 4d9a + 4e0e: 4603 mov r3, r0 + 4e10: 2800 cmp r0, #0 + 4e12: d1f2 bne.n 4dfa rc = mfg_read_next_mmr(mmr_ref.area_id); - 4db4: f89d 000c ldrb.w r0, [sp, #12] - 4db8: f7ff ff3c bl 4c34 + 4e14: f89d 000c ldrb.w r0, [sp, #12] + 4e18: f7ff ff3c bl 4c94 if (rc != 0 && rc != SYS_EALREADY) { - 4dbc: 4603 mov r3, r0 - 4dbe: 2800 cmp r0, #0 - 4dc0: d0e1 beq.n 4d86 - 4dc2: f110 0f0b cmn.w r0, #11 - 4dc6: d0de beq.n 4d86 - 4dc8: e7e7 b.n 4d9a + 4e1c: 4603 mov r3, r0 + 4e1e: 2800 cmp r0, #0 + 4e20: d0e1 beq.n 4de6 + 4e22: f110 0f0b cmn.w r0, #11 + 4e26: d0de beq.n 4de6 + 4e28: e7e7 b.n 4dfa ... -00004dcc <__aeabi_uldivmod>: - 4dcc: b953 cbnz r3, 4de4 <__aeabi_uldivmod+0x18> - 4dce: b94a cbnz r2, 4de4 <__aeabi_uldivmod+0x18> - 4dd0: 2900 cmp r1, #0 - 4dd2: bf08 it eq - 4dd4: 2800 cmpeq r0, #0 - 4dd6: bf1c itt ne - 4dd8: f04f 31ff movne.w r1, #4294967295 ; 0xffffffff - 4ddc: f04f 30ff movne.w r0, #4294967295 ; 0xffffffff - 4de0: f000 b972 b.w 50c8 <__aeabi_idiv0> - 4de4: f1ad 0c08 sub.w ip, sp, #8 - 4de8: e96d ce04 strd ip, lr, [sp, #-16]! - 4dec: f000 f806 bl 4dfc <__udivmoddi4> - 4df0: f8dd e004 ldr.w lr, [sp, #4] - 4df4: e9dd 2302 ldrd r2, r3, [sp, #8] - 4df8: b004 add sp, #16 - 4dfa: 4770 bx lr - -00004dfc <__udivmoddi4>: - 4dfc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 4e00: 9e08 ldr r6, [sp, #32] - 4e02: 4604 mov r4, r0 - 4e04: 4688 mov r8, r1 - 4e06: 2b00 cmp r3, #0 - 4e08: d14b bne.n 4ea2 <__udivmoddi4+0xa6> - 4e0a: 428a cmp r2, r1 - 4e0c: 4615 mov r5, r2 - 4e0e: d967 bls.n 4ee0 <__udivmoddi4+0xe4> - 4e10: fab2 f282 clz r2, r2 - 4e14: b14a cbz r2, 4e2a <__udivmoddi4+0x2e> - 4e16: f1c2 0720 rsb r7, r2, #32 - 4e1a: fa01 f302 lsl.w r3, r1, r2 - 4e1e: fa20 f707 lsr.w r7, r0, r7 - 4e22: 4095 lsls r5, r2 - 4e24: ea47 0803 orr.w r8, r7, r3 - 4e28: 4094 lsls r4, r2 - 4e2a: ea4f 4e15 mov.w lr, r5, lsr #16 - 4e2e: 0c23 lsrs r3, r4, #16 - 4e30: fbb8 f7fe udiv r7, r8, lr - 4e34: fa1f fc85 uxth.w ip, r5 - 4e38: fb0e 8817 mls r8, lr, r7, r8 - 4e3c: ea43 4308 orr.w r3, r3, r8, lsl #16 - 4e40: fb07 f10c mul.w r1, r7, ip - 4e44: 4299 cmp r1, r3 - 4e46: d909 bls.n 4e5c <__udivmoddi4+0x60> - 4e48: 18eb adds r3, r5, r3 - 4e4a: f107 30ff add.w r0, r7, #4294967295 ; 0xffffffff - 4e4e: f080 811b bcs.w 5088 <__udivmoddi4+0x28c> - 4e52: 4299 cmp r1, r3 - 4e54: f240 8118 bls.w 5088 <__udivmoddi4+0x28c> - 4e58: 3f02 subs r7, #2 - 4e5a: 442b add r3, r5 - 4e5c: 1a5b subs r3, r3, r1 - 4e5e: b2a4 uxth r4, r4 - 4e60: fbb3 f0fe udiv r0, r3, lr - 4e64: fb0e 3310 mls r3, lr, r0, r3 - 4e68: ea44 4403 orr.w r4, r4, r3, lsl #16 - 4e6c: fb00 fc0c mul.w ip, r0, ip - 4e70: 45a4 cmp ip, r4 - 4e72: d909 bls.n 4e88 <__udivmoddi4+0x8c> - 4e74: 192c adds r4, r5, r4 - 4e76: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff - 4e7a: f080 8107 bcs.w 508c <__udivmoddi4+0x290> - 4e7e: 45a4 cmp ip, r4 - 4e80: f240 8104 bls.w 508c <__udivmoddi4+0x290> - 4e84: 3802 subs r0, #2 - 4e86: 442c add r4, r5 - 4e88: ea40 4007 orr.w r0, r0, r7, lsl #16 - 4e8c: eba4 040c sub.w r4, r4, ip - 4e90: 2700 movs r7, #0 - 4e92: b11e cbz r6, 4e9c <__udivmoddi4+0xa0> - 4e94: 40d4 lsrs r4, r2 - 4e96: 2300 movs r3, #0 - 4e98: e9c6 4300 strd r4, r3, [r6] - 4e9c: 4639 mov r1, r7 - 4e9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 4ea2: 428b cmp r3, r1 - 4ea4: d909 bls.n 4eba <__udivmoddi4+0xbe> - 4ea6: 2e00 cmp r6, #0 - 4ea8: f000 80eb beq.w 5082 <__udivmoddi4+0x286> - 4eac: 2700 movs r7, #0 - 4eae: e9c6 0100 strd r0, r1, [r6] - 4eb2: 4638 mov r0, r7 - 4eb4: 4639 mov r1, r7 - 4eb6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 4eba: fab3 f783 clz r7, r3 - 4ebe: 2f00 cmp r7, #0 - 4ec0: d147 bne.n 4f52 <__udivmoddi4+0x156> - 4ec2: 428b cmp r3, r1 - 4ec4: d302 bcc.n 4ecc <__udivmoddi4+0xd0> - 4ec6: 4282 cmp r2, r0 - 4ec8: f200 80fa bhi.w 50c0 <__udivmoddi4+0x2c4> - 4ecc: 1a84 subs r4, r0, r2 - 4ece: eb61 0303 sbc.w r3, r1, r3 - 4ed2: 2001 movs r0, #1 - 4ed4: 4698 mov r8, r3 - 4ed6: 2e00 cmp r6, #0 - 4ed8: d0e0 beq.n 4e9c <__udivmoddi4+0xa0> - 4eda: e9c6 4800 strd r4, r8, [r6] - 4ede: e7dd b.n 4e9c <__udivmoddi4+0xa0> - 4ee0: b902 cbnz r2, 4ee4 <__udivmoddi4+0xe8> - 4ee2: deff udf #255 ; 0xff - 4ee4: fab2 f282 clz r2, r2 - 4ee8: 2a00 cmp r2, #0 - 4eea: f040 808f bne.w 500c <__udivmoddi4+0x210> - 4eee: 1b49 subs r1, r1, r5 - 4ef0: ea4f 4e15 mov.w lr, r5, lsr #16 - 4ef4: fa1f f885 uxth.w r8, r5 - 4ef8: 2701 movs r7, #1 - 4efa: fbb1 fcfe udiv ip, r1, lr - 4efe: 0c23 lsrs r3, r4, #16 - 4f00: fb0e 111c mls r1, lr, ip, r1 - 4f04: ea43 4301 orr.w r3, r3, r1, lsl #16 - 4f08: fb08 f10c mul.w r1, r8, ip - 4f0c: 4299 cmp r1, r3 - 4f0e: d907 bls.n 4f20 <__udivmoddi4+0x124> - 4f10: 18eb adds r3, r5, r3 - 4f12: f10c 30ff add.w r0, ip, #4294967295 ; 0xffffffff - 4f16: d202 bcs.n 4f1e <__udivmoddi4+0x122> - 4f18: 4299 cmp r1, r3 - 4f1a: f200 80cd bhi.w 50b8 <__udivmoddi4+0x2bc> - 4f1e: 4684 mov ip, r0 - 4f20: 1a59 subs r1, r3, r1 - 4f22: b2a3 uxth r3, r4 - 4f24: fbb1 f0fe udiv r0, r1, lr - 4f28: fb0e 1410 mls r4, lr, r0, r1 - 4f2c: ea43 4404 orr.w r4, r3, r4, lsl #16 - 4f30: fb08 f800 mul.w r8, r8, r0 - 4f34: 45a0 cmp r8, r4 - 4f36: d907 bls.n 4f48 <__udivmoddi4+0x14c> - 4f38: 192c adds r4, r5, r4 - 4f3a: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff - 4f3e: d202 bcs.n 4f46 <__udivmoddi4+0x14a> - 4f40: 45a0 cmp r8, r4 - 4f42: f200 80b6 bhi.w 50b2 <__udivmoddi4+0x2b6> - 4f46: 4618 mov r0, r3 - 4f48: eba4 0408 sub.w r4, r4, r8 - 4f4c: ea40 400c orr.w r0, r0, ip, lsl #16 - 4f50: e79f b.n 4e92 <__udivmoddi4+0x96> - 4f52: f1c7 0c20 rsb ip, r7, #32 - 4f56: 40bb lsls r3, r7 - 4f58: fa22 fe0c lsr.w lr, r2, ip - 4f5c: ea4e 0e03 orr.w lr, lr, r3 - 4f60: fa01 f407 lsl.w r4, r1, r7 - 4f64: fa20 f50c lsr.w r5, r0, ip - 4f68: fa21 f30c lsr.w r3, r1, ip - 4f6c: ea4f 481e mov.w r8, lr, lsr #16 - 4f70: 4325 orrs r5, r4 - 4f72: fbb3 f9f8 udiv r9, r3, r8 - 4f76: 0c2c lsrs r4, r5, #16 - 4f78: fb08 3319 mls r3, r8, r9, r3 - 4f7c: fa1f fa8e uxth.w sl, lr - 4f80: ea44 4303 orr.w r3, r4, r3, lsl #16 - 4f84: fb09 f40a mul.w r4, r9, sl - 4f88: 429c cmp r4, r3 - 4f8a: fa02 f207 lsl.w r2, r2, r7 - 4f8e: fa00 f107 lsl.w r1, r0, r7 - 4f92: d90b bls.n 4fac <__udivmoddi4+0x1b0> - 4f94: eb1e 0303 adds.w r3, lr, r3 - 4f98: f109 30ff add.w r0, r9, #4294967295 ; 0xffffffff - 4f9c: f080 8087 bcs.w 50ae <__udivmoddi4+0x2b2> - 4fa0: 429c cmp r4, r3 - 4fa2: f240 8084 bls.w 50ae <__udivmoddi4+0x2b2> - 4fa6: f1a9 0902 sub.w r9, r9, #2 - 4faa: 4473 add r3, lr - 4fac: 1b1b subs r3, r3, r4 - 4fae: b2ad uxth r5, r5 - 4fb0: fbb3 f0f8 udiv r0, r3, r8 - 4fb4: fb08 3310 mls r3, r8, r0, r3 - 4fb8: ea45 4403 orr.w r4, r5, r3, lsl #16 - 4fbc: fb00 fa0a mul.w sl, r0, sl - 4fc0: 45a2 cmp sl, r4 - 4fc2: d908 bls.n 4fd6 <__udivmoddi4+0x1da> - 4fc4: eb1e 0404 adds.w r4, lr, r4 - 4fc8: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff - 4fcc: d26b bcs.n 50a6 <__udivmoddi4+0x2aa> - 4fce: 45a2 cmp sl, r4 - 4fd0: d969 bls.n 50a6 <__udivmoddi4+0x2aa> - 4fd2: 3802 subs r0, #2 - 4fd4: 4474 add r4, lr - 4fd6: ea40 4009 orr.w r0, r0, r9, lsl #16 - 4fda: fba0 8902 umull r8, r9, r0, r2 - 4fde: eba4 040a sub.w r4, r4, sl - 4fe2: 454c cmp r4, r9 - 4fe4: 46c2 mov sl, r8 - 4fe6: 464b mov r3, r9 - 4fe8: d354 bcc.n 5094 <__udivmoddi4+0x298> - 4fea: d051 beq.n 5090 <__udivmoddi4+0x294> - 4fec: 2e00 cmp r6, #0 - 4fee: d069 beq.n 50c4 <__udivmoddi4+0x2c8> - 4ff0: ebb1 050a subs.w r5, r1, sl - 4ff4: eb64 0403 sbc.w r4, r4, r3 - 4ff8: fa04 fc0c lsl.w ip, r4, ip - 4ffc: 40fd lsrs r5, r7 - 4ffe: 40fc lsrs r4, r7 - 5000: ea4c 0505 orr.w r5, ip, r5 - 5004: e9c6 5400 strd r5, r4, [r6] - 5008: 2700 movs r7, #0 - 500a: e747 b.n 4e9c <__udivmoddi4+0xa0> - 500c: f1c2 0320 rsb r3, r2, #32 - 5010: fa20 f703 lsr.w r7, r0, r3 - 5014: 4095 lsls r5, r2 - 5016: fa01 f002 lsl.w r0, r1, r2 - 501a: fa21 f303 lsr.w r3, r1, r3 - 501e: ea4f 4e15 mov.w lr, r5, lsr #16 - 5022: 4338 orrs r0, r7 - 5024: 0c01 lsrs r1, r0, #16 - 5026: fbb3 f7fe udiv r7, r3, lr - 502a: fa1f f885 uxth.w r8, r5 - 502e: fb0e 3317 mls r3, lr, r7, r3 - 5032: ea41 4103 orr.w r1, r1, r3, lsl #16 - 5036: fb07 f308 mul.w r3, r7, r8 - 503a: 428b cmp r3, r1 - 503c: fa04 f402 lsl.w r4, r4, r2 - 5040: d907 bls.n 5052 <__udivmoddi4+0x256> - 5042: 1869 adds r1, r5, r1 - 5044: f107 3cff add.w ip, r7, #4294967295 ; 0xffffffff - 5048: d22f bcs.n 50aa <__udivmoddi4+0x2ae> - 504a: 428b cmp r3, r1 - 504c: d92d bls.n 50aa <__udivmoddi4+0x2ae> - 504e: 3f02 subs r7, #2 - 5050: 4429 add r1, r5 - 5052: 1acb subs r3, r1, r3 - 5054: b281 uxth r1, r0 - 5056: fbb3 f0fe udiv r0, r3, lr - 505a: fb0e 3310 mls r3, lr, r0, r3 - 505e: ea41 4103 orr.w r1, r1, r3, lsl #16 - 5062: fb00 f308 mul.w r3, r0, r8 - 5066: 428b cmp r3, r1 - 5068: d907 bls.n 507a <__udivmoddi4+0x27e> - 506a: 1869 adds r1, r5, r1 - 506c: f100 3cff add.w ip, r0, #4294967295 ; 0xffffffff - 5070: d217 bcs.n 50a2 <__udivmoddi4+0x2a6> - 5072: 428b cmp r3, r1 - 5074: d915 bls.n 50a2 <__udivmoddi4+0x2a6> - 5076: 3802 subs r0, #2 - 5078: 4429 add r1, r5 - 507a: 1ac9 subs r1, r1, r3 - 507c: ea40 4707 orr.w r7, r0, r7, lsl #16 - 5080: e73b b.n 4efa <__udivmoddi4+0xfe> - 5082: 4637 mov r7, r6 - 5084: 4630 mov r0, r6 - 5086: e709 b.n 4e9c <__udivmoddi4+0xa0> - 5088: 4607 mov r7, r0 - 508a: e6e7 b.n 4e5c <__udivmoddi4+0x60> - 508c: 4618 mov r0, r3 - 508e: e6fb b.n 4e88 <__udivmoddi4+0x8c> - 5090: 4541 cmp r1, r8 - 5092: d2ab bcs.n 4fec <__udivmoddi4+0x1f0> - 5094: ebb8 0a02 subs.w sl, r8, r2 - 5098: eb69 020e sbc.w r2, r9, lr - 509c: 3801 subs r0, #1 - 509e: 4613 mov r3, r2 - 50a0: e7a4 b.n 4fec <__udivmoddi4+0x1f0> - 50a2: 4660 mov r0, ip - 50a4: e7e9 b.n 507a <__udivmoddi4+0x27e> - 50a6: 4618 mov r0, r3 - 50a8: e795 b.n 4fd6 <__udivmoddi4+0x1da> - 50aa: 4667 mov r7, ip - 50ac: e7d1 b.n 5052 <__udivmoddi4+0x256> - 50ae: 4681 mov r9, r0 - 50b0: e77c b.n 4fac <__udivmoddi4+0x1b0> - 50b2: 3802 subs r0, #2 - 50b4: 442c add r4, r5 - 50b6: e747 b.n 4f48 <__udivmoddi4+0x14c> - 50b8: f1ac 0c02 sub.w ip, ip, #2 - 50bc: 442b add r3, r5 - 50be: e72f b.n 4f20 <__udivmoddi4+0x124> - 50c0: 4638 mov r0, r7 - 50c2: e708 b.n 4ed6 <__udivmoddi4+0xda> - 50c4: 4637 mov r7, r6 - 50c6: e6e9 b.n 4e9c <__udivmoddi4+0xa0> - -000050c8 <__aeabi_idiv0>: - 50c8: 4770 bx lr - 50ca: bf00 nop - -000050cc : - 50cc: 5120 0000 00e8 2000 Q..... - -000050d4 : - 50d4: 7530 0000 1a80 0006 d4c0 0001 3500 000c 0u...........5.. - 50e4: 49f0 0002 4240 000f c6c0 002d 9680 0098 .I..@B....-..... - 50f4: 02bc 0000 0bb8 0000 0014 0000 0032 0000 ............2... - -00005104 : - 5104: 07f7 0000 0881 0000 09fb 0000 06ad 0000 ................ - 5114: 0000 0000 0b39 0000 0acd 0000 ....9....... - -00005120 : - 5120: 5138 0000 0000 0000 0000 0008 0080 0000 8Q.............. - 5130: 0001 0000 00ff 0000 ........ - -00005138 : - 5138: 0ced 0000 0c1d 0000 0ba5 0000 0bfd 0000 ................ - 5148: 0000 0000 0bf9 0000 0000 0000 ............ - -00005154 : - 5154: 63bc 2000 0000 0000 0000 0000 .c. ........ - -00005160 : - 5160: 0302 0004 .... - -00005164 : - 5164: 63e4 2000 0000 0000 0000 0000 0000 0000 .c. ............ +00004e2c <__aeabi_uldivmod>: + 4e2c: b953 cbnz r3, 4e44 <__aeabi_uldivmod+0x18> + 4e2e: b94a cbnz r2, 4e44 <__aeabi_uldivmod+0x18> + 4e30: 2900 cmp r1, #0 + 4e32: bf08 it eq + 4e34: 2800 cmpeq r0, #0 + 4e36: bf1c itt ne + 4e38: f04f 31ff movne.w r1, #4294967295 ; 0xffffffff + 4e3c: f04f 30ff movne.w r0, #4294967295 ; 0xffffffff + 4e40: f000 b972 b.w 5128 <__aeabi_idiv0> + 4e44: f1ad 0c08 sub.w ip, sp, #8 + 4e48: e96d ce04 strd ip, lr, [sp, #-16]! + 4e4c: f000 f806 bl 4e5c <__udivmoddi4> + 4e50: f8dd e004 ldr.w lr, [sp, #4] + 4e54: e9dd 2302 ldrd r2, r3, [sp, #8] + 4e58: b004 add sp, #16 + 4e5a: 4770 bx lr + +00004e5c <__udivmoddi4>: + 4e5c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 4e60: 9e08 ldr r6, [sp, #32] + 4e62: 4604 mov r4, r0 + 4e64: 4688 mov r8, r1 + 4e66: 2b00 cmp r3, #0 + 4e68: d14b bne.n 4f02 <__udivmoddi4+0xa6> + 4e6a: 428a cmp r2, r1 + 4e6c: 4615 mov r5, r2 + 4e6e: d967 bls.n 4f40 <__udivmoddi4+0xe4> + 4e70: fab2 f282 clz r2, r2 + 4e74: b14a cbz r2, 4e8a <__udivmoddi4+0x2e> + 4e76: f1c2 0720 rsb r7, r2, #32 + 4e7a: fa01 f302 lsl.w r3, r1, r2 + 4e7e: fa20 f707 lsr.w r7, r0, r7 + 4e82: 4095 lsls r5, r2 + 4e84: ea47 0803 orr.w r8, r7, r3 + 4e88: 4094 lsls r4, r2 + 4e8a: ea4f 4e15 mov.w lr, r5, lsr #16 + 4e8e: 0c23 lsrs r3, r4, #16 + 4e90: fbb8 f7fe udiv r7, r8, lr + 4e94: fa1f fc85 uxth.w ip, r5 + 4e98: fb0e 8817 mls r8, lr, r7, r8 + 4e9c: ea43 4308 orr.w r3, r3, r8, lsl #16 + 4ea0: fb07 f10c mul.w r1, r7, ip + 4ea4: 4299 cmp r1, r3 + 4ea6: d909 bls.n 4ebc <__udivmoddi4+0x60> + 4ea8: 18eb adds r3, r5, r3 + 4eaa: f107 30ff add.w r0, r7, #4294967295 ; 0xffffffff + 4eae: f080 811b bcs.w 50e8 <__udivmoddi4+0x28c> + 4eb2: 4299 cmp r1, r3 + 4eb4: f240 8118 bls.w 50e8 <__udivmoddi4+0x28c> + 4eb8: 3f02 subs r7, #2 + 4eba: 442b add r3, r5 + 4ebc: 1a5b subs r3, r3, r1 + 4ebe: b2a4 uxth r4, r4 + 4ec0: fbb3 f0fe udiv r0, r3, lr + 4ec4: fb0e 3310 mls r3, lr, r0, r3 + 4ec8: ea44 4403 orr.w r4, r4, r3, lsl #16 + 4ecc: fb00 fc0c mul.w ip, r0, ip + 4ed0: 45a4 cmp ip, r4 + 4ed2: d909 bls.n 4ee8 <__udivmoddi4+0x8c> + 4ed4: 192c adds r4, r5, r4 + 4ed6: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff + 4eda: f080 8107 bcs.w 50ec <__udivmoddi4+0x290> + 4ede: 45a4 cmp ip, r4 + 4ee0: f240 8104 bls.w 50ec <__udivmoddi4+0x290> + 4ee4: 3802 subs r0, #2 + 4ee6: 442c add r4, r5 + 4ee8: ea40 4007 orr.w r0, r0, r7, lsl #16 + 4eec: eba4 040c sub.w r4, r4, ip + 4ef0: 2700 movs r7, #0 + 4ef2: b11e cbz r6, 4efc <__udivmoddi4+0xa0> + 4ef4: 40d4 lsrs r4, r2 + 4ef6: 2300 movs r3, #0 + 4ef8: e9c6 4300 strd r4, r3, [r6] + 4efc: 4639 mov r1, r7 + 4efe: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 4f02: 428b cmp r3, r1 + 4f04: d909 bls.n 4f1a <__udivmoddi4+0xbe> + 4f06: 2e00 cmp r6, #0 + 4f08: f000 80eb beq.w 50e2 <__udivmoddi4+0x286> + 4f0c: 2700 movs r7, #0 + 4f0e: e9c6 0100 strd r0, r1, [r6] + 4f12: 4638 mov r0, r7 + 4f14: 4639 mov r1, r7 + 4f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 4f1a: fab3 f783 clz r7, r3 + 4f1e: 2f00 cmp r7, #0 + 4f20: d147 bne.n 4fb2 <__udivmoddi4+0x156> + 4f22: 428b cmp r3, r1 + 4f24: d302 bcc.n 4f2c <__udivmoddi4+0xd0> + 4f26: 4282 cmp r2, r0 + 4f28: f200 80fa bhi.w 5120 <__udivmoddi4+0x2c4> + 4f2c: 1a84 subs r4, r0, r2 + 4f2e: eb61 0303 sbc.w r3, r1, r3 + 4f32: 2001 movs r0, #1 + 4f34: 4698 mov r8, r3 + 4f36: 2e00 cmp r6, #0 + 4f38: d0e0 beq.n 4efc <__udivmoddi4+0xa0> + 4f3a: e9c6 4800 strd r4, r8, [r6] + 4f3e: e7dd b.n 4efc <__udivmoddi4+0xa0> + 4f40: b902 cbnz r2, 4f44 <__udivmoddi4+0xe8> + 4f42: deff udf #255 ; 0xff + 4f44: fab2 f282 clz r2, r2 + 4f48: 2a00 cmp r2, #0 + 4f4a: f040 808f bne.w 506c <__udivmoddi4+0x210> + 4f4e: 1b49 subs r1, r1, r5 + 4f50: ea4f 4e15 mov.w lr, r5, lsr #16 + 4f54: fa1f f885 uxth.w r8, r5 + 4f58: 2701 movs r7, #1 + 4f5a: fbb1 fcfe udiv ip, r1, lr + 4f5e: 0c23 lsrs r3, r4, #16 + 4f60: fb0e 111c mls r1, lr, ip, r1 + 4f64: ea43 4301 orr.w r3, r3, r1, lsl #16 + 4f68: fb08 f10c mul.w r1, r8, ip + 4f6c: 4299 cmp r1, r3 + 4f6e: d907 bls.n 4f80 <__udivmoddi4+0x124> + 4f70: 18eb adds r3, r5, r3 + 4f72: f10c 30ff add.w r0, ip, #4294967295 ; 0xffffffff + 4f76: d202 bcs.n 4f7e <__udivmoddi4+0x122> + 4f78: 4299 cmp r1, r3 + 4f7a: f200 80cd bhi.w 5118 <__udivmoddi4+0x2bc> + 4f7e: 4684 mov ip, r0 + 4f80: 1a59 subs r1, r3, r1 + 4f82: b2a3 uxth r3, r4 + 4f84: fbb1 f0fe udiv r0, r1, lr + 4f88: fb0e 1410 mls r4, lr, r0, r1 + 4f8c: ea43 4404 orr.w r4, r3, r4, lsl #16 + 4f90: fb08 f800 mul.w r8, r8, r0 + 4f94: 45a0 cmp r8, r4 + 4f96: d907 bls.n 4fa8 <__udivmoddi4+0x14c> + 4f98: 192c adds r4, r5, r4 + 4f9a: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff + 4f9e: d202 bcs.n 4fa6 <__udivmoddi4+0x14a> + 4fa0: 45a0 cmp r8, r4 + 4fa2: f200 80b6 bhi.w 5112 <__udivmoddi4+0x2b6> + 4fa6: 4618 mov r0, r3 + 4fa8: eba4 0408 sub.w r4, r4, r8 + 4fac: ea40 400c orr.w r0, r0, ip, lsl #16 + 4fb0: e79f b.n 4ef2 <__udivmoddi4+0x96> + 4fb2: f1c7 0c20 rsb ip, r7, #32 + 4fb6: 40bb lsls r3, r7 + 4fb8: fa22 fe0c lsr.w lr, r2, ip + 4fbc: ea4e 0e03 orr.w lr, lr, r3 + 4fc0: fa01 f407 lsl.w r4, r1, r7 + 4fc4: fa20 f50c lsr.w r5, r0, ip + 4fc8: fa21 f30c lsr.w r3, r1, ip + 4fcc: ea4f 481e mov.w r8, lr, lsr #16 + 4fd0: 4325 orrs r5, r4 + 4fd2: fbb3 f9f8 udiv r9, r3, r8 + 4fd6: 0c2c lsrs r4, r5, #16 + 4fd8: fb08 3319 mls r3, r8, r9, r3 + 4fdc: fa1f fa8e uxth.w sl, lr + 4fe0: ea44 4303 orr.w r3, r4, r3, lsl #16 + 4fe4: fb09 f40a mul.w r4, r9, sl + 4fe8: 429c cmp r4, r3 + 4fea: fa02 f207 lsl.w r2, r2, r7 + 4fee: fa00 f107 lsl.w r1, r0, r7 + 4ff2: d90b bls.n 500c <__udivmoddi4+0x1b0> + 4ff4: eb1e 0303 adds.w r3, lr, r3 + 4ff8: f109 30ff add.w r0, r9, #4294967295 ; 0xffffffff + 4ffc: f080 8087 bcs.w 510e <__udivmoddi4+0x2b2> + 5000: 429c cmp r4, r3 + 5002: f240 8084 bls.w 510e <__udivmoddi4+0x2b2> + 5006: f1a9 0902 sub.w r9, r9, #2 + 500a: 4473 add r3, lr + 500c: 1b1b subs r3, r3, r4 + 500e: b2ad uxth r5, r5 + 5010: fbb3 f0f8 udiv r0, r3, r8 + 5014: fb08 3310 mls r3, r8, r0, r3 + 5018: ea45 4403 orr.w r4, r5, r3, lsl #16 + 501c: fb00 fa0a mul.w sl, r0, sl + 5020: 45a2 cmp sl, r4 + 5022: d908 bls.n 5036 <__udivmoddi4+0x1da> + 5024: eb1e 0404 adds.w r4, lr, r4 + 5028: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff + 502c: d26b bcs.n 5106 <__udivmoddi4+0x2aa> + 502e: 45a2 cmp sl, r4 + 5030: d969 bls.n 5106 <__udivmoddi4+0x2aa> + 5032: 3802 subs r0, #2 + 5034: 4474 add r4, lr + 5036: ea40 4009 orr.w r0, r0, r9, lsl #16 + 503a: fba0 8902 umull r8, r9, r0, r2 + 503e: eba4 040a sub.w r4, r4, sl + 5042: 454c cmp r4, r9 + 5044: 46c2 mov sl, r8 + 5046: 464b mov r3, r9 + 5048: d354 bcc.n 50f4 <__udivmoddi4+0x298> + 504a: d051 beq.n 50f0 <__udivmoddi4+0x294> + 504c: 2e00 cmp r6, #0 + 504e: d069 beq.n 5124 <__udivmoddi4+0x2c8> + 5050: ebb1 050a subs.w r5, r1, sl + 5054: eb64 0403 sbc.w r4, r4, r3 + 5058: fa04 fc0c lsl.w ip, r4, ip + 505c: 40fd lsrs r5, r7 + 505e: 40fc lsrs r4, r7 + 5060: ea4c 0505 orr.w r5, ip, r5 + 5064: e9c6 5400 strd r5, r4, [r6] + 5068: 2700 movs r7, #0 + 506a: e747 b.n 4efc <__udivmoddi4+0xa0> + 506c: f1c2 0320 rsb r3, r2, #32 + 5070: fa20 f703 lsr.w r7, r0, r3 + 5074: 4095 lsls r5, r2 + 5076: fa01 f002 lsl.w r0, r1, r2 + 507a: fa21 f303 lsr.w r3, r1, r3 + 507e: ea4f 4e15 mov.w lr, r5, lsr #16 + 5082: 4338 orrs r0, r7 + 5084: 0c01 lsrs r1, r0, #16 + 5086: fbb3 f7fe udiv r7, r3, lr + 508a: fa1f f885 uxth.w r8, r5 + 508e: fb0e 3317 mls r3, lr, r7, r3 + 5092: ea41 4103 orr.w r1, r1, r3, lsl #16 + 5096: fb07 f308 mul.w r3, r7, r8 + 509a: 428b cmp r3, r1 + 509c: fa04 f402 lsl.w r4, r4, r2 + 50a0: d907 bls.n 50b2 <__udivmoddi4+0x256> + 50a2: 1869 adds r1, r5, r1 + 50a4: f107 3cff add.w ip, r7, #4294967295 ; 0xffffffff + 50a8: d22f bcs.n 510a <__udivmoddi4+0x2ae> + 50aa: 428b cmp r3, r1 + 50ac: d92d bls.n 510a <__udivmoddi4+0x2ae> + 50ae: 3f02 subs r7, #2 + 50b0: 4429 add r1, r5 + 50b2: 1acb subs r3, r1, r3 + 50b4: b281 uxth r1, r0 + 50b6: fbb3 f0fe udiv r0, r3, lr + 50ba: fb0e 3310 mls r3, lr, r0, r3 + 50be: ea41 4103 orr.w r1, r1, r3, lsl #16 + 50c2: fb00 f308 mul.w r3, r0, r8 + 50c6: 428b cmp r3, r1 + 50c8: d907 bls.n 50da <__udivmoddi4+0x27e> + 50ca: 1869 adds r1, r5, r1 + 50cc: f100 3cff add.w ip, r0, #4294967295 ; 0xffffffff + 50d0: d217 bcs.n 5102 <__udivmoddi4+0x2a6> + 50d2: 428b cmp r3, r1 + 50d4: d915 bls.n 5102 <__udivmoddi4+0x2a6> + 50d6: 3802 subs r0, #2 + 50d8: 4429 add r1, r5 + 50da: 1ac9 subs r1, r1, r3 + 50dc: ea40 4707 orr.w r7, r0, r7, lsl #16 + 50e0: e73b b.n 4f5a <__udivmoddi4+0xfe> + 50e2: 4637 mov r7, r6 + 50e4: 4630 mov r0, r6 + 50e6: e709 b.n 4efc <__udivmoddi4+0xa0> + 50e8: 4607 mov r7, r0 + 50ea: e6e7 b.n 4ebc <__udivmoddi4+0x60> + 50ec: 4618 mov r0, r3 + 50ee: e6fb b.n 4ee8 <__udivmoddi4+0x8c> + 50f0: 4541 cmp r1, r8 + 50f2: d2ab bcs.n 504c <__udivmoddi4+0x1f0> + 50f4: ebb8 0a02 subs.w sl, r8, r2 + 50f8: eb69 020e sbc.w r2, r9, lr + 50fc: 3801 subs r0, #1 + 50fe: 4613 mov r3, r2 + 5100: e7a4 b.n 504c <__udivmoddi4+0x1f0> + 5102: 4660 mov r0, ip + 5104: e7e9 b.n 50da <__udivmoddi4+0x27e> + 5106: 4618 mov r0, r3 + 5108: e795 b.n 5036 <__udivmoddi4+0x1da> + 510a: 4667 mov r7, ip + 510c: e7d1 b.n 50b2 <__udivmoddi4+0x256> + 510e: 4681 mov r9, r0 + 5110: e77c b.n 500c <__udivmoddi4+0x1b0> + 5112: 3802 subs r0, #2 + 5114: 442c add r4, r5 + 5116: e747 b.n 4fa8 <__udivmoddi4+0x14c> + 5118: f1ac 0c02 sub.w ip, ip, #2 + 511c: 442b add r3, r5 + 511e: e72f b.n 4f80 <__udivmoddi4+0x124> + 5120: 4638 mov r0, r7 + 5122: e708 b.n 4f36 <__udivmoddi4+0xda> + 5124: 4637 mov r7, r6 + 5126: e6e9 b.n 4efc <__udivmoddi4+0xa0> + +00005128 <__aeabi_idiv0>: + 5128: 4770 bx lr + 512a: bf00 nop + +0000512c : + 512c: 5180 0000 00e8 2000 .Q..... + +00005134 : + 5134: 7530 0000 1a80 0006 d4c0 0001 3500 000c 0u...........5.. + 5144: 49f0 0002 4240 000f c6c0 002d 9680 0098 .I..@B....-..... + 5154: 02bc 0000 0bb8 0000 0014 0000 0032 0000 ............2... + +00005164 : + 5164: 07f7 0000 0881 0000 09fb 0000 06ad 0000 ................ + 5174: 0000 0000 0b39 0000 0acd 0000 ....9....... + +00005180 : + 5180: 5198 0000 0000 0000 0000 0008 0080 0000 .Q.............. + 5190: 0001 0000 00ff 0000 ........ + +00005198 : + 5198: 0ced 0000 0c1d 0000 0ba5 0000 0bfd 0000 ................ + 51a8: 0000 0000 0bf9 0000 0000 0000 ............ + +000051b4 : + 51b4: 63bc 2000 0000 0000 0000 0000 .c. ........ + +000051c0 : + 51c0: 0302 0004 .... + +000051c4 : + 51c4: 63e4 2000 0000 0000 0000 0000 0000 0000 .c. ............ ... - 517c: 7341 6573 7472 4020 3020 2578 0a78 0000 Assert @ 0x%x... - 518c: 7341 6573 7472 4020 3020 2578 2078 202d Assert @ 0x%x - - 519c: 7325 253a 0a64 0000 6e55 6168 646e 656c %s:%d...Unhandle - 51ac: 2064 6e69 6574 7272 7075 2074 2528 646c d interrupt (%ld - 51bc: 2c29 6520 6378 7065 6974 6e6f 7320 2070 ), exception sp - 51cc: 7830 3025 6c38 0a78 0000 0000 7220 3a30 0x%08lx..... r0: - 51dc: 7830 3025 6c38 2078 7220 3a31 7830 3025 0x%08lx r1:0x%0 - 51ec: 6c38 2078 7220 3a32 7830 3025 6c38 2078 8lx r2:0x%08lx - 51fc: 7220 3a33 7830 3025 6c38 0a78 0000 0000 r3:0x%08lx..... - 520c: 7220 3a34 7830 3025 6c38 2078 7220 3a35 r4:0x%08lx r5: - 521c: 7830 3025 6c38 2078 7220 3a36 7830 3025 0x%08lx r6:0x%0 - 522c: 6c38 2078 7220 3a37 7830 3025 6c38 0a78 8lx r7:0x%08lx. - 523c: 0000 0000 7220 3a38 7830 3025 6c38 2078 .... r8:0x%08lx - 524c: 7220 3a39 7830 3025 6c38 2078 3172 3a30 r9:0x%08lx r10: - 525c: 7830 3025 6c38 2078 3172 3a31 7830 3025 0x%08lx r11:0x%0 - 526c: 6c38 0a78 0000 0000 3172 3a32 7830 3025 8lx.....r12:0x%0 - 527c: 6c38 2078 6c20 3a72 7830 3025 6c38 2078 8lx lr:0x%08lx - 528c: 7020 3a63 7830 3025 6c38 2078 7370 3a72 pc:0x%08lx psr: - 529c: 7830 3025 6c38 0a78 0000 0000 4349 5253 0x%08lx.....ICSR - 52ac: 303a 2578 3830 786c 4820 5346 3a52 7830 :0x%08lx HFSR:0x - 52bc: 3025 6c38 2078 4643 5253 303a 2578 3830 %08lx CFSR:0x%08 - 52cc: 786c 000a 4642 5241 303a 2578 3830 786c lx..BFAR:0x%08lx - 52dc: 4d20 464d 5241 303a 2578 3830 786c 000a MMFAR:0x%08lx.. - 52ec: 736d 7379 315f 0000 6f42 746f 6f6c 6461 msys_1..Bootload - 52fc: 7265 6420 6e6f 0a65 0000 0000 7453 7261 er done.....Star - 530c: 6974 676e 4220 6f6f 6c74 616f 6564 2e72 ting Bootloader. - 531c: 2e2e 000a 7542 7474 6e6f 203a 6425 000a ....Button: %d.. - -0000532c : - 532c: 0005 0000 .... - -00005330 : - 5330: 2c01 002d .,-. - -00005334 : - 5334: 2c01 002d .,-. - -00005338 : - 5338: 2c01 012d 2d2c 0000 .,-.,-.. - -00005340 : - 5340: 0007 0000 .... - -00005344 : - 5344: 0000 0000 .... - -00005348 : - 5348: 02a2 0084 .... - -0000534c : - 534c: 00c5 0000 .... - -00005350 : - 5350: 000a 0000 .... - -00005354 : - 5354: 2a8a 0000 .*.. - -00005358 : - 5358: ee8a 0000 .... - -0000535c : - 535c: 000e 0000 6944 7073 616c 6979 676e 6920 ....Displaying i - 536c: 616d 6567 2e2e 0a2e 0000 0000 6d49 6761 mage........Imag - 537c: 2065 6964 7073 616c 6579 0a64 0000 0000 e displayed..... - 538c: 3025 6c36 2075 0000 455b 5252 205d 6170 %06lu ..[ERR] pa - 539c: 696e 2163 0000 0000 575b 4e52 205d 6146 nic!....[WRN] Fa - 53ac: 6c69 6465 7220 6165 6964 676e 7320 6365 iled reading sec - 53bc: 6f74 7372 203b 4f42 544f 4d5f 5841 495f tors; BOOT_MAX_I - 53cc: 474d 535f 4345 4f54 5352 253d 2064 202d MG_SECTORS=%d - - 53dc: 6f74 206f 6d73 6c61 3f6c 000a 575b 4e52 too small?..[WRN - 53ec: 205d 6146 6c69 6465 7220 6165 6964 676e ] Failed reading - 53fc: 6920 616d 6567 6820 6165 6564 7372 203b image headers; - 540c: 6d49 6761 3d65 7525 000a 0000 575b 4e52 Image=%u....[WRN - 541c: 205d 6146 6c69 6465 7220 6165 6964 676e ] Failed reading - 542c: 6220 6f6f 2074 7473 7461 7375 203b 6d49 boot status; Im - 543c: 6761 3d65 7525 000a 7270 6d69 7261 0079 age=%u..primary. - 544c: 6573 6f63 646e 7261 0079 0000 455b 5252 secondary...[ERR - 545c: 205d 6d49 6761 2065 6e69 7420 6568 2520 ] Image in the % - 546c: 2073 6c73 746f 6920 2073 6f6e 2074 6176 s slot is not va - 547c: 696c 2164 000a 0000 455b 5252 205d 6162 lid!....[ERR] ba - 548c: 2064 6d69 6761 2065 616d 6967 2063 7830 d image magic 0x - 549c: 6c25 3b78 4920 616d 6567 253d 0a75 0000 %lx; Image=%u... - 54ac: 575b 4e52 205d 6143 6e6e 746f 7520 6770 [WRN] Cannot upg - 54bc: 6172 6564 203a 6f6d 6572 7320 6365 6f74 rade: more secto - 54cc: 7372 7420 6168 206e 6c61 6f6c 6577 0064 rs than allowed. - 54dc: 575b 4e52 205d 6143 6e6e 746f 7520 6770 [WRN] Cannot upg - 54ec: 6172 6564 203a 6c73 746f 2073 6168 6576 rade: slots have - 54fc: 6e20 6e6f 632d 6d6f 6170 6974 6c62 2065 non-compatible - 550c: 6573 7463 726f 0073 575b 4e52 205d 6143 sectors.[WRN] Ca - 551c: 6e6e 746f 7520 6770 6172 6564 203a 6f6e nnot upgrade: no - 552c: 2074 6c61 206c 6573 7463 726f 2073 6966 t all sectors fi - 553c: 2074 6e69 6973 6564 7320 7263 7461 6863 t inside scratch - 554c: 0000 0000 575b 4e52 205d 6143 6e6e 746f ....[WRN] Cannot - 555c: 7520 6770 6172 6564 203a 6c73 746f 2073 upgrade: slots - 556c: 7261 2065 6f6e 2074 6f63 706d 7461 6269 are not compatib - 557c: 656c 0000 le.. - -00005580 : - 5580: 0501 0001 0501 0203 0104 0104 0403 0203 ................ - 5590: 455b 5252 205d 6544 6574 7463 6465 6920 [ERR] Detected i - 55a0: 636e 6e6f 6973 7473 6e65 2074 7473 7461 nconsistent stat - 55b0: 7375 0021 6162 0064 6f67 646f 0000 0000 us!.bad.good.... - 55c0: 6e75 6573 0074 0000 6373 6172 6374 0068 unset...scratch. - 55d0: 6f6e 656e 0000 0000 5542 3b47 6320 6e61 none....BUG; can - 55e0: 7427 6820 7061 6570 006e 0000 7270 6d69 't happen...prim - 55f0: 7261 2079 6c73 746f 0000 0000 7250 6d69 ary slot....Prim - 5600: 7261 2079 6d69 6761 0065 0000 495b 464e ary image...[INF - 5610: 205d 7325 203a 616d 6967 3d63 7325 202c ] %s: magic=%s, - 5620: 7773 7061 745f 7079 3d65 7830 7825 202c swap_type=0x%x, - 5630: 6f63 7970 645f 6e6f 3d65 7830 7825 202c copy_done=0x%x, - 5640: 6d69 6761 5f65 6b6f 303d 2578 0a78 0000 image_ok=0x%x... - 5650: 6353 6172 6374 0068 495b 464e 205d 6f42 Scratch.[INF] Bo - 5660: 746f 7320 756f 6372 3a65 2520 0a73 0000 ot source: %s... - 5670: 495b 464e 205d 6f42 746f 7320 756f 6372 [INF] Boot sourc - 5680: 3a65 6e20 6e6f 0065 0103 0000 e: none..... - -0000568c : - 568c: c277 f395 d260 7fef 5235 0f50 b62c 8079 w...`...5RP.,.y. - -0000569c : - 569c: 0104 0304 0204 0104 0104 0304 0301 0403 ................ - 56ac: 0401 0000 6570 6d72 0000 0000 6574 7473 ....perm....test - 56bc: 0000 0000 6572 6576 7472 0000 495b 464e ....revert..[INF - 56cc: 205d 7753 7061 7420 7079 3a65 2520 0a73 ] Swap type: %s. - 56dc: 0000 0000 495b 464e 205d 7753 7061 7420 ....[INF] Swap t - 56ec: 7079 3a65 6e20 6e6f 0065 0000 ype: none... - -000056f8 : - 56f8: 2f98 428a 4491 7137 fbcf b5c0 dba5 e9b5 ./.B.D7q........ - 5708: c25b 3956 11f1 59f1 82a4 923f 5ed5 ab1c [.V9...Y..?..^.. - 5718: aa98 d807 5b01 1283 85be 2431 7dc3 550c .....[....1$.}.U - 5728: 5d74 72be b1fe 80de 06a7 9bdc f174 c19b t].r........t... - 5738: 69c1 e49b 4786 efbe 9dc6 0fc1 a1cc 240c .i...G.........$ - 5748: 2c6f 2de9 84aa 4a74 a9dc 5cb0 88da 76f9 o,.-..tJ...\...v - 5758: 5152 983e c66d a831 27c8 b003 7fc7 bf59 RQ>.m.1..'....Y. - 5768: 0bf3 c6e0 9147 d5a7 6351 06ca 2967 1429 ....G...Qc..g)). - 5778: 0a85 27b7 2138 2e1b 6dfc 4d2c 0d13 5338 ...'8!...m,M..8S - 5788: 7354 650a 0abb 766a c92e 81c2 2c85 9272 Ts.e..jv.....,r. - 5798: e8a1 a2bf 664b a81a 8b70 c24b 51a3 c76c ....Kf..p.K..Ql. - 57a8: e819 d192 0624 d699 3585 f40e a070 106a ....$....5..p.j. - 57b8: c116 19a4 6c08 1e37 774c 2748 bcb5 34b0 .....l7.LwH'...4 - 57c8: 0cb3 391c aa4a 4ed8 ca4f 5b9c 6ff3 682e ...9J..NO..[.o.h - 57d8: 82ee 748f 636f 78a5 7814 84c8 0208 8cc7 ...toc.x.x...... - 57e8: fffa 90be 6ceb a450 a3f7 bef9 78f2 c671 .....lP......xq. - -000057f8 : - 57f8: 0150 2000 P.. - -000057fc : + 51dc: 7341 6573 7472 4020 3020 2578 0a78 0000 Assert @ 0x%x... + 51ec: 7341 6573 7472 4020 3020 2578 2078 202d Assert @ 0x%x - + 51fc: 7325 253a 0a64 0000 6e55 6168 646e 656c %s:%d...Unhandle + 520c: 2064 6e69 6574 7272 7075 2074 2528 646c d interrupt (%ld + 521c: 2c29 6520 6378 7065 6974 6e6f 7320 2070 ), exception sp + 522c: 7830 3025 6c38 0a78 0000 0000 7220 3a30 0x%08lx..... r0: + 523c: 7830 3025 6c38 2078 7220 3a31 7830 3025 0x%08lx r1:0x%0 + 524c: 6c38 2078 7220 3a32 7830 3025 6c38 2078 8lx r2:0x%08lx + 525c: 7220 3a33 7830 3025 6c38 0a78 0000 0000 r3:0x%08lx..... + 526c: 7220 3a34 7830 3025 6c38 2078 7220 3a35 r4:0x%08lx r5: + 527c: 7830 3025 6c38 2078 7220 3a36 7830 3025 0x%08lx r6:0x%0 + 528c: 6c38 2078 7220 3a37 7830 3025 6c38 0a78 8lx r7:0x%08lx. + 529c: 0000 0000 7220 3a38 7830 3025 6c38 2078 .... r8:0x%08lx + 52ac: 7220 3a39 7830 3025 6c38 2078 3172 3a30 r9:0x%08lx r10: + 52bc: 7830 3025 6c38 2078 3172 3a31 7830 3025 0x%08lx r11:0x%0 + 52cc: 6c38 0a78 0000 0000 3172 3a32 7830 3025 8lx.....r12:0x%0 + 52dc: 6c38 2078 6c20 3a72 7830 3025 6c38 2078 8lx lr:0x%08lx + 52ec: 7020 3a63 7830 3025 6c38 2078 7370 3a72 pc:0x%08lx psr: + 52fc: 7830 3025 6c38 0a78 0000 0000 4349 5253 0x%08lx.....ICSR + 530c: 303a 2578 3830 786c 4820 5346 3a52 7830 :0x%08lx HFSR:0x + 531c: 3025 6c38 2078 4643 5253 303a 2578 3830 %08lx CFSR:0x%08 + 532c: 786c 000a 4642 5241 303a 2578 3830 786c lx..BFAR:0x%08lx + 533c: 4d20 464d 5241 303a 2578 3830 786c 000a MMFAR:0x%08lx.. + 534c: 736d 7379 315f 0000 6157 7469 6e69 2067 msys_1..Waiting + 535c: 2035 6573 6f63 646e 2073 6f66 2072 7562 5 seconds for bu + 536c: 7474 6e6f 203a 6425 2e2e 0a2e 0000 0000 tton: %d........ + 537c: 6157 7469 6465 6620 726f 6220 7475 6f74 Waited for butto + 538c: 3a6e 2520 0a64 0000 6f42 746f 6f6c 6461 n: %d...Bootload + 539c: 7265 6420 6e6f 0a65 0000 0000 7453 7261 er done.....Star + 53ac: 6974 676e 4220 6f6f 6c74 616f 6564 2e72 ting Bootloader. + 53bc: 2e2e 000a 6843 6365 206b 7562 7474 6e6f ....Check button + 53cc: 203a 6425 000a 0000 : %d.... + +000053d4 : + 53d4: 0005 0000 .... + +000053d8 : + 53d8: 2c01 002d .,-. + +000053dc : + 53dc: 2c01 002d .,-. + +000053e0 : + 53e0: 2c01 012d 2d2c 0000 .,-.,-.. + +000053e8 : + 53e8: 0007 0000 .... + +000053ec : + 53ec: 0000 0000 .... + +000053f0 : + 53f0: 02a2 0084 .... + +000053f4 : + 53f4: 00c5 0000 .... + +000053f8 : + 53f8: 000a 0000 .... + +000053fc : + 53fc: 2a8a 0000 .*.. + +00005400 : + 5400: ee8a 0000 .... + +00005404 : + 5404: 000e 0000 6944 7073 616c 6979 676e 6920 ....Displaying i + 5414: 616d 6567 2e2e 0a2e 0000 0000 6d49 6761 mage........Imag + 5424: 2065 6964 7073 616c 6579 0a64 0000 0000 e displayed..... + 5434: 3025 6c36 2075 0000 455b 5252 205d 6170 %06lu ..[ERR] pa + 5444: 696e 2163 0000 0000 575b 4e52 205d 6146 nic!....[WRN] Fa + 5454: 6c69 6465 7220 6165 6964 676e 7320 6365 iled reading sec + 5464: 6f74 7372 203b 4f42 544f 4d5f 5841 495f tors; BOOT_MAX_I + 5474: 474d 535f 4345 4f54 5352 253d 2064 202d MG_SECTORS=%d - + 5484: 6f74 206f 6d73 6c61 3f6c 000a 575b 4e52 too small?..[WRN + 5494: 205d 6146 6c69 6465 7220 6165 6964 676e ] Failed reading + 54a4: 6920 616d 6567 6820 6165 6564 7372 203b image headers; + 54b4: 6d49 6761 3d65 7525 000a 0000 575b 4e52 Image=%u....[WRN + 54c4: 205d 6146 6c69 6465 7220 6165 6964 676e ] Failed reading + 54d4: 6220 6f6f 2074 7473 7461 7375 203b 6d49 boot status; Im + 54e4: 6761 3d65 7525 000a 7270 6d69 7261 0079 age=%u..primary. + 54f4: 6573 6f63 646e 7261 0079 0000 455b 5252 secondary...[ERR + 5504: 205d 6d49 6761 2065 6e69 7420 6568 2520 ] Image in the % + 5514: 2073 6c73 746f 6920 2073 6f6e 2074 6176 s slot is not va + 5524: 696c 2164 000a 0000 455b 5252 205d 6162 lid!....[ERR] ba + 5534: 2064 6d69 6761 2065 616d 6967 2063 7830 d image magic 0x + 5544: 6c25 3b78 4920 616d 6567 253d 0a75 0000 %lx; Image=%u... + 5554: 575b 4e52 205d 6143 6e6e 746f 7520 6770 [WRN] Cannot upg + 5564: 6172 6564 203a 6f6d 6572 7320 6365 6f74 rade: more secto + 5574: 7372 7420 6168 206e 6c61 6f6c 6577 0064 rs than allowed. + 5584: 575b 4e52 205d 6143 6e6e 746f 7520 6770 [WRN] Cannot upg + 5594: 6172 6564 203a 6c73 746f 2073 6168 6576 rade: slots have + 55a4: 6e20 6e6f 632d 6d6f 6170 6974 6c62 2065 non-compatible + 55b4: 6573 7463 726f 0073 575b 4e52 205d 6143 sectors.[WRN] Ca + 55c4: 6e6e 746f 7520 6770 6172 6564 203a 6f6e nnot upgrade: no + 55d4: 2074 6c61 206c 6573 7463 726f 2073 6966 t all sectors fi + 55e4: 2074 6e69 6973 6564 7320 7263 7461 6863 t inside scratch + 55f4: 0000 0000 575b 4e52 205d 6143 6e6e 746f ....[WRN] Cannot + 5604: 7520 6770 6172 6564 203a 6c73 746f 2073 upgrade: slots + 5614: 7261 2065 6f6e 2074 6f63 706d 7461 6269 are not compatib + 5624: 656c 0000 le.. + +00005628 : + 5628: 0501 0001 0501 0203 0104 0104 0403 0203 ................ + 5638: 455b 5252 205d 6544 6574 7463 6465 6920 [ERR] Detected i + 5648: 636e 6e6f 6973 7473 6e65 2074 7473 7461 nconsistent stat + 5658: 7375 0021 6162 0064 6f67 646f 0000 0000 us!.bad.good.... + 5668: 6e75 6573 0074 0000 6373 6172 6374 0068 unset...scratch. + 5678: 6f6e 656e 0000 0000 5542 3b47 6320 6e61 none....BUG; can + 5688: 7427 6820 7061 6570 006e 0000 7270 6d69 't happen...prim + 5698: 7261 2079 6c73 746f 0000 0000 7250 6d69 ary slot....Prim + 56a8: 7261 2079 6d69 6761 0065 0000 495b 464e ary image...[INF + 56b8: 205d 7325 203a 616d 6967 3d63 7325 202c ] %s: magic=%s, + 56c8: 7773 7061 745f 7079 3d65 7830 7825 202c swap_type=0x%x, + 56d8: 6f63 7970 645f 6e6f 3d65 7830 7825 202c copy_done=0x%x, + 56e8: 6d69 6761 5f65 6b6f 303d 2578 0a78 0000 image_ok=0x%x... + 56f8: 6353 6172 6374 0068 495b 464e 205d 6f42 Scratch.[INF] Bo + 5708: 746f 7320 756f 6372 3a65 2520 0a73 0000 ot source: %s... + 5718: 495b 464e 205d 6f42 746f 7320 756f 6372 [INF] Boot sourc + 5728: 3a65 6e20 6e6f 0065 0103 0000 e: none..... + +00005734 : + 5734: c277 f395 d260 7fef 5235 0f50 b62c 8079 w...`...5RP.,.y. + +00005744 : + 5744: 0104 0304 0204 0104 0104 0304 0301 0403 ................ + 5754: 0401 0000 6570 6d72 0000 0000 6574 7473 ....perm....test + 5764: 0000 0000 6572 6576 7472 0000 495b 464e ....revert..[INF + 5774: 205d 7753 7061 7420 7079 3a65 2520 0a73 ] Swap type: %s. + 5784: 0000 0000 495b 464e 205d 7753 7061 7420 ....[INF] Swap t + 5794: 7079 3a65 6e20 6e6f 0065 0000 ype: none... + +000057a0 : + 57a0: 2f98 428a 4491 7137 fbcf b5c0 dba5 e9b5 ./.B.D7q........ + 57b0: c25b 3956 11f1 59f1 82a4 923f 5ed5 ab1c [.V9...Y..?..^.. + 57c0: aa98 d807 5b01 1283 85be 2431 7dc3 550c .....[....1$.}.U + 57d0: 5d74 72be b1fe 80de 06a7 9bdc f174 c19b t].r........t... + 57e0: 69c1 e49b 4786 efbe 9dc6 0fc1 a1cc 240c .i...G.........$ + 57f0: 2c6f 2de9 84aa 4a74 a9dc 5cb0 88da 76f9 o,.-..tJ...\...v + 5800: 5152 983e c66d a831 27c8 b003 7fc7 bf59 RQ>.m.1..'....Y. + 5810: 0bf3 c6e0 9147 d5a7 6351 06ca 2967 1429 ....G...Qc..g)). + 5820: 0a85 27b7 2138 2e1b 6dfc 4d2c 0d13 5338 ...'8!...m,M..8S + 5830: 7354 650a 0abb 766a c92e 81c2 2c85 9272 Ts.e..jv.....,r. + 5840: e8a1 a2bf 664b a81a 8b70 c24b 51a3 c76c ....Kf..p.K..Ql. + 5850: e819 d192 0624 d699 3585 f40e a070 106a ....$....5..p.j. + 5860: c116 19a4 6c08 1e37 774c 2748 bcb5 34b0 .....l7.LwH'...4 + 5870: 0cb3 391c aa4a 4ed8 ca4f 5b9c 6ff3 682e ...9J..NO..[.o.h + 5880: 82ee 748f 636f 78a5 7814 84c8 0208 8cc7 ...toc.x.x...... + 5890: fffa 90be 6ceb a450 a3f7 bef9 78f2 c671 .....lP......xq. + +000058a0 : + 58a0: 0150 2000 P.. + +000058a4 : ... - 5804: 6000 0000 0001 0000 8000 0000 4000 0007 .`...........@.. - 5814: 0102 0000 0000 0004 4000 0007 0003 0000 .........@...... - 5824: c000 0007 1000 0000 0010 0000 6000 0000 .............`.. - 5834: 2000 0000 0111 0000 4000 000b c000 0034 . .......@....4. + 58ac: 6000 0000 0001 0000 8000 0000 4000 0007 .`...........@.. + 58bc: 0102 0000 0000 0004 4000 0007 0003 0000 .........@...... + 58cc: c000 0007 1000 0000 0010 0000 6000 0000 .............`.. + 58dc: 2000 0000 0111 0000 4000 000b c000 0034 . .......@....4. /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/mynewt.elf: file format elf32-littlearm arm-none-eabi-objdump: section '.rodata' mentioned in a -j option, but not found in any input file text data bss dec hex filename - 22620 132 25504 48256 bc80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/mynewt.elf + 22788 132 25504 48424 bd28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/mynewt.elf diff --git a/logs/mynewt.elf.map b/logs/mynewt.elf.map index 724b87242..67ac77342 100644 --- a/logs/mynewt.elf.map +++ b/logs/mynewt.elf.map @@ -1342,7 +1342,7 @@ END GROUP 0x0000000000000000 . = (. + _imghdr_size) 0x0000000000000000 __text = . -.text 0x0000000000000000 0x5844 +.text 0x0000000000000000 0x58ec 0x0000000000000000 __isr_vector_start = . *(.isr_vector) .isr_vector 0x0000000000000000 0xd8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) @@ -1728,392 +1728,394 @@ END GROUP 0x0000000000001dba memcpy .text.memset 0x0000000000001dd4 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) 0x0000000000001dd4 memset + .text.relocate_vector_table + 0x0000000000001e0c 0x50 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) .text.pinetime_boot_init - 0x0000000000001e0c 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - 0x0000000000001e0c pinetime_boot_init + 0x0000000000001e5c 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + 0x0000000000001e5c pinetime_boot_init .text.pinetime_boot_check_button - 0x0000000000001e50 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - 0x0000000000001e50 pinetime_boot_check_button + 0x0000000000001ea0 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + 0x0000000000001ea0 pinetime_boot_check_button .text.boot_custom_start - 0x0000000000001e6c 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - 0x0000000000001e6c boot_custom_start + 0x0000000000001ebc 0x68 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + 0x0000000000001ebc boot_custom_start .text.hard_reset - 0x0000000000001ec4 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000001f24 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.delay_ms - 0x0000000000001ee2 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000001f42 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.transmit_spi - 0x0000000000001eea 0x3a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000001f4a 0x3a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.write_data - 0x0000000000001f24 0x1a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000001f84 0x1a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.write_command - 0x0000000000001f3e 0x4e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000001f9e 0x4e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.init_display - 0x0000000000001f8c 0x14c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000001fec 0x14c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.set_orientation - 0x00000000000020d8 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000002138 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.set_window - 0x0000000000002100 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000002160 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .text.pinetime_boot_display_image - 0x00000000000021d0 0xe4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - 0x00000000000021d0 pinetime_boot_display_image + 0x0000000000002230 0xe4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000002230 pinetime_boot_display_image .text.console_write - 0x00000000000022b4 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - 0x00000000000022b4 console_write + 0x0000000000002314 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + 0x0000000000002314 console_write .text.console_blocking_mode - 0x00000000000022d2 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - 0x00000000000022d2 console_blocking_mode - *fill* 0x00000000000022da 0x2 + 0x0000000000002332 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + 0x0000000000002332 console_blocking_mode + *fill* 0x000000000000233a 0x2 .text.console_pkg_init - 0x00000000000022dc 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - 0x00000000000022dc console_pkg_init + 0x000000000000233c 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + 0x000000000000233c console_pkg_init .text.console_printf - 0x0000000000002314 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - 0x0000000000002314 console_printf + 0x0000000000002374 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + 0x0000000000002374 console_printf .text.__semihost - 0x000000000000235c 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x00000000000023bc 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) .text.debugger_connected - 0x0000000000002380 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x00000000000023e0 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) .text.semihost_write - 0x0000000000002390 0x2e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - *fill* 0x00000000000023be 0x2 + 0x00000000000023f0 0x2e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + *fill* 0x000000000000241e 0x2 .text.console_flush - 0x00000000000023c0 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - 0x00000000000023c0 console_flush + 0x0000000000002420 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x0000000000002420 console_flush .text.disable_buffer - 0x0000000000002408 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - 0x0000000000002408 disable_buffer + 0x0000000000002468 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x0000000000002468 disable_buffer .text.console_buffer - 0x0000000000002410 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - 0x0000000000002410 console_buffer + 0x0000000000002470 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x0000000000002470 console_buffer .text.semihosting_console_write_ch - 0x0000000000002464 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x00000000000024c4 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) .text.console_out_nolock - 0x0000000000002480 0x3c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - 0x0000000000002480 console_out_nolock + 0x00000000000024e0 0x3c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x00000000000024e0 console_out_nolock .text.semihosting_console_init - 0x00000000000024bc 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - 0x00000000000024bc semihosting_console_init + 0x000000000000251c 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x000000000000251c semihosting_console_init .text.console_get_ticks - 0x00000000000024c0 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) - 0x00000000000024c0 console_get_ticks + 0x0000000000002520 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + 0x0000000000002520 console_get_ticks .text.sysinit_dflt_panic_cb - 0x00000000000024cc 0x6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - *fill* 0x00000000000024d2 0x2 + 0x000000000000252c 0x6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + *fill* 0x0000000000002532 0x2 .text.sysinit_start - 0x00000000000024d4 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - 0x00000000000024d4 sysinit_start + 0x0000000000002534 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + 0x0000000000002534 sysinit_start .text.sysinit_end - 0x00000000000024e0 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - 0x00000000000024e0 sysinit_end + 0x0000000000002540 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + 0x0000000000002540 sysinit_end .text.mem_init_mbuf_pool - 0x00000000000024ec 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - 0x00000000000024ec mem_init_mbuf_pool + 0x000000000000254c 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + 0x000000000000254c mem_init_mbuf_pool .text.sysinit_app - 0x000000000000251c 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) - 0x000000000000251c sysinit_app + 0x000000000000257c 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + 0x000000000000257c sysinit_app .text.boot_is_header_valid - 0x0000000000002538 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002598 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_write_sz - 0x0000000000002578 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000025d8 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_read_image_size - 0x0000000000002594 0x9c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000025f4 0x9c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_check_header_erased - 0x0000000000002630 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002690 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_initialize_area - 0x0000000000002684 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000026e4 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_read_sectors - 0x00000000000026cc 0x3a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - *fill* 0x0000000000002706 0x2 + 0x000000000000272c 0x3a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + *fill* 0x0000000000002766 0x2 .text.boot_image_check - 0x0000000000002708 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002768 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_validate_slot - 0x000000000000273c 0x98 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x000000000000279c 0x98 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_validated_swap_type - 0x00000000000027d4 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002834 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_read_image_headers - 0x000000000000280c 0x36 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x000000000000286c 0x36 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_status_reset - 0x0000000000002842 0x14 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002842 boot_status_reset + 0x00000000000028a2 0x14 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000028a2 boot_status_reset .text.boot_status_is_reset - 0x0000000000002856 0x22 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002856 boot_status_is_reset + 0x00000000000028b6 0x22 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000028b6 boot_status_is_reset .text.boot_swap_image - 0x0000000000002878 0x9c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000028d8 0x9c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_complete_partial_swap - 0x0000000000002914 0x84 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002974 0x84 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_perform_update - 0x0000000000002998 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x00000000000029f8 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_prepare_image_for_update - 0x00000000000029f0 0xe4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002a50 0xe4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .text.boot_write_status - 0x0000000000002ad4 0x68 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002ad4 boot_write_status + 0x0000000000002b34 0x68 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002b34 boot_write_status .text.boot_erase_region - 0x0000000000002b3c 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002b3c boot_erase_region + 0x0000000000002b9c 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002b9c boot_erase_region .text.boot_copy_region - 0x0000000000002b44 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002b44 boot_copy_region + 0x0000000000002ba4 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002ba4 boot_copy_region .text.context_boot_go - 0x0000000000002b9c 0x140 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002b9c context_boot_go - .text.boot_go 0x0000000000002cdc 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - 0x0000000000002cdc boot_go + 0x0000000000002bfc 0x140 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002bfc context_boot_go + .text.boot_go 0x0000000000002d3c 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000002d3c boot_go .text.swap_erase_trailer_sectors - 0x0000000000002cec 0x84 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - 0x0000000000002cec swap_erase_trailer_sectors + 0x0000000000002d4c 0x84 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + 0x0000000000002d4c swap_erase_trailer_sectors .text.swap_status_init - 0x0000000000002d70 0x8a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - 0x0000000000002d70 swap_status_init + 0x0000000000002dd0 0x8a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + 0x0000000000002dd0 swap_status_init .text.swap_read_status - 0x0000000000002dfa 0x7c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - 0x0000000000002dfa swap_read_status + 0x0000000000002e5a 0x7c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + 0x0000000000002e5a swap_read_status .text.swap_set_copy_done - 0x0000000000002e76 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - 0x0000000000002e76 swap_set_copy_done + 0x0000000000002ed6 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + 0x0000000000002ed6 swap_set_copy_done .text.swap_set_image_ok - 0x0000000000002e94 0x3a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - 0x0000000000002e94 swap_set_image_ok + 0x0000000000002ef4 0x3a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + 0x0000000000002ef4 swap_set_image_ok .text.boot_copy_sz - 0x0000000000002ece 0x2e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x0000000000002f2e 0x2e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) .text.boot_swap_sectors - 0x0000000000002efc 0x332 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x0000000000002f5c 0x332 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) .text.boot_read_image_header - 0x000000000000322e 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - 0x000000000000322e boot_read_image_header - *fill* 0x0000000000003262 0x2 + 0x000000000000328e 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x000000000000328e boot_read_image_header + *fill* 0x00000000000032c2 0x2 .text.swap_read_status_bytes - 0x0000000000003264 0xbc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - 0x0000000000003264 swap_read_status_bytes + 0x00000000000032c4 0xbc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x00000000000032c4 swap_read_status_bytes .text.boot_status_internal_off - 0x0000000000003320 0x1a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - 0x0000000000003320 boot_status_internal_off - *fill* 0x000000000000333a 0x2 + 0x0000000000003380 0x1a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x0000000000003380 boot_status_internal_off + *fill* 0x000000000000339a 0x2 .text.boot_slots_compatible - 0x000000000000333c 0x100 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - 0x000000000000333c boot_slots_compatible + 0x000000000000339c 0x100 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x000000000000339c boot_slots_compatible .text.swap_status_source - 0x000000000000343c 0x13c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - 0x000000000000343c swap_status_source + 0x000000000000349c 0x13c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x000000000000349c swap_status_source .text.swap_run - 0x0000000000003578 0x7e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - 0x0000000000003578 swap_run + 0x00000000000035d8 0x7e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x00000000000035d8 swap_run .text.boot_flag_decode - 0x00000000000035f6 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - *fill* 0x0000000000003602 0x2 + 0x0000000000003656 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + *fill* 0x0000000000003662 0x2 .text.boot_magic_decode - 0x0000000000003604 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003664 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) .text.boot_find_status - 0x000000000000361c 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x000000000000367c 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) .text.boot_write_trailer - 0x000000000000367c 0x6a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x00000000000036dc 0x6a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) .text.boot_write_trailer_flag - 0x00000000000036e6 0x16 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003746 0x16 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) .text.boot_magic_compatible_check - 0x00000000000036fc 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x00000000000036fc boot_magic_compatible_check + 0x000000000000375c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x000000000000375c boot_magic_compatible_check .text.boot_status_sz - 0x000000000000371c 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x000000000000371c boot_status_sz + 0x000000000000377c 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x000000000000377c boot_status_sz .text.boot_trailer_sz - 0x0000000000003724 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003724 boot_trailer_sz + 0x0000000000003784 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003784 boot_trailer_sz .text.boot_status_entries - 0x000000000000372e 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x000000000000372e boot_status_entries + 0x000000000000378e 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x000000000000378e boot_status_entries .text.boot_status_off - 0x000000000000374c 0x22 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x000000000000374c boot_status_off + 0x00000000000037ac 0x22 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x00000000000037ac boot_status_off .text.boot_swap_info_off - 0x000000000000376e 0x6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x000000000000376e boot_swap_info_off + 0x00000000000037ce 0x6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x00000000000037ce boot_swap_info_off .text.boot_read_swap_state - 0x0000000000003774 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003774 boot_read_swap_state + 0x00000000000037d4 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x00000000000037d4 boot_read_swap_state .text.boot_read_swap_state_by_id - 0x0000000000003834 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003834 boot_read_swap_state_by_id + 0x0000000000003894 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003894 boot_read_swap_state_by_id .text.boot_read_swap_size - 0x0000000000003854 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003854 boot_read_swap_size + 0x00000000000038b4 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x00000000000038b4 boot_read_swap_size .text.boot_write_magic - 0x0000000000003884 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003884 boot_write_magic + 0x00000000000038e4 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x00000000000038e4 boot_write_magic .text.boot_write_copy_done - 0x00000000000038a4 0xe /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x00000000000038a4 boot_write_copy_done + 0x0000000000003904 0xe /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003904 boot_write_copy_done .text.boot_write_image_ok - 0x00000000000038b2 0xe /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x00000000000038b2 boot_write_image_ok + 0x0000000000003912 0xe /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003912 boot_write_image_ok .text.boot_write_swap_info - 0x00000000000038c0 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x00000000000038c0 boot_write_swap_info + 0x0000000000003920 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003920 boot_write_swap_info .text.boot_write_swap_size - 0x0000000000003904 0x22 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003904 boot_write_swap_size - *fill* 0x0000000000003926 0x2 + 0x0000000000003964 0x22 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003964 boot_write_swap_size + *fill* 0x0000000000003986 0x2 .text.boot_swap_type_multi - 0x0000000000003928 0xd8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x0000000000003928 boot_swap_type_multi + 0x0000000000003988 0xd8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000003988 boot_swap_type_multi .text.bootutil_img_hash - 0x0000000000003a00 0x7e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + 0x0000000000003a60 0x7e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) .text.bootutil_img_validate - 0x0000000000003a7e 0xba /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - 0x0000000000003a7e bootutil_img_validate + 0x0000000000003ade 0xba /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + 0x0000000000003ade bootutil_img_validate .text.bootutil_tlv_iter_begin - 0x0000000000003b38 0xca /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - 0x0000000000003b38 bootutil_tlv_iter_begin + 0x0000000000003b98 0xca /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + 0x0000000000003b98 bootutil_tlv_iter_begin .text.bootutil_tlv_iter_next - 0x0000000000003c02 0xb8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - 0x0000000000003c02 bootutil_tlv_iter_next + 0x0000000000003c62 0xb8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + 0x0000000000003c62 bootutil_tlv_iter_next .text.flash_area_id_from_multi_image_slot - 0x0000000000003cba 0x12 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - 0x0000000000003cba flash_area_id_from_multi_image_slot + 0x0000000000003d1a 0x12 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + 0x0000000000003d1a flash_area_id_from_multi_image_slot .text.mbedtls_sha256_init - 0x0000000000003ccc 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - 0x0000000000003ccc mbedtls_sha256_init + 0x0000000000003d2c 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + 0x0000000000003d2c mbedtls_sha256_init .text.mbedtls_sha256_starts_ret - 0x0000000000003cd8 0xa4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - 0x0000000000003cd8 mbedtls_sha256_starts_ret + 0x0000000000003d38 0xa4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + 0x0000000000003d38 mbedtls_sha256_starts_ret .text.mbedtls_internal_sha256_process - 0x0000000000003d7c 0x128 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - 0x0000000000003d7c mbedtls_internal_sha256_process + 0x0000000000003ddc 0x128 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + 0x0000000000003ddc mbedtls_internal_sha256_process .text.mbedtls_sha256_update_ret - 0x0000000000003ea4 0x86 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - 0x0000000000003ea4 mbedtls_sha256_update_ret + 0x0000000000003f04 0x86 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + 0x0000000000003f04 mbedtls_sha256_update_ret .text.mbedtls_sha256_finish_ret - 0x0000000000003f2a 0x13e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - 0x0000000000003f2a mbedtls_sha256_finish_ret + 0x0000000000003f8a 0x13e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + 0x0000000000003f8a mbedtls_sha256_finish_ret .text.hal_flash_check_addr - 0x0000000000004068 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x00000000000040c8 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) .text.hal_flash_init - 0x0000000000004086 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x0000000000004086 hal_flash_init + 0x00000000000040e6 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x00000000000040e6 hal_flash_init .text.hal_flash_align - 0x00000000000040ae 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x00000000000040ae hal_flash_align + 0x000000000000410e 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x000000000000410e hal_flash_align .text.hal_flash_erased_val - 0x00000000000040be 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x00000000000040be hal_flash_erased_val + 0x000000000000411e 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x000000000000411e hal_flash_erased_val .text.hal_flash_read - 0x00000000000040ce 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x00000000000040ce hal_flash_read - *fill* 0x0000000000004122 0x2 + 0x000000000000412e 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x000000000000412e hal_flash_read + *fill* 0x0000000000004182 0x2 .text.hal_flash_write - 0x0000000000004124 0x74 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x0000000000004124 hal_flash_write + 0x0000000000004184 0x74 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x0000000000004184 hal_flash_write .text.hal_flash_erase - 0x0000000000004198 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x0000000000004198 hal_flash_erase + 0x00000000000041f8 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x00000000000041f8 hal_flash_erase .text.hal_flash_is_erased - 0x0000000000004268 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x0000000000004268 hal_flash_is_erased + 0x00000000000042c8 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x00000000000042c8 hal_flash_is_erased .text.hal_flash_isempty - 0x0000000000004298 0x62 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - 0x0000000000004298 hal_flash_isempty + 0x00000000000042f8 0x62 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x00000000000042f8 hal_flash_isempty .text.hal_system_start - 0x00000000000042fa 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - 0x00000000000042fa hal_system_start - .text.fwrite 0x0000000000004304 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - 0x0000000000004304 fwrite - *fill* 0x0000000000004322 0x2 - .text.puts 0x0000000000004324 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - 0x0000000000004324 puts + 0x000000000000435a 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + 0x000000000000435a hal_system_start + .text.fwrite 0x0000000000004364 0x1e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + 0x0000000000004364 fwrite + *fill* 0x0000000000004382 0x2 + .text.puts 0x0000000000004384 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + 0x0000000000004384 puts .text.stdin_read - 0x0000000000004358 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + 0x00000000000043b8 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) .text.stdout_write - 0x000000000000435c 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .text.strlen 0x000000000000436c 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - 0x000000000000436c strlen - .text.ui2a 0x000000000000437c 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .text.i2a 0x000000000000443c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .text.a2d 0x000000000000445c 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .text.a2i 0x000000000000448c 0x36 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .text.putf 0x00000000000044c2 0x2a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .text.putchw 0x00000000000044ec 0x11c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .text.intarg 0x0000000000004608 0x64 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + 0x00000000000043bc 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .text.strlen 0x00000000000043cc 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + 0x00000000000043cc strlen + .text.ui2a 0x00000000000043dc 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .text.i2a 0x000000000000449c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .text.a2d 0x00000000000044bc 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .text.a2i 0x00000000000044ec 0x36 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .text.putf 0x0000000000004522 0x2a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .text.putchw 0x000000000000454c 0x11c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .text.intarg 0x0000000000004668 0x64 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) .text.tfp_format - 0x000000000000466c 0x25c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - 0x000000000000466c tfp_format + 0x00000000000046cc 0x25c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + 0x00000000000046cc tfp_format .text.vfprintf - 0x00000000000048c8 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - 0x00000000000048c8 vfprintf - .text.printf 0x00000000000048d0 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - 0x00000000000048d0 printf - .text.vprintf 0x00000000000048f4 0x14 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - 0x00000000000048f4 vprintf + 0x0000000000004928 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + 0x0000000000004928 vfprintf + .text.printf 0x0000000000004930 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + 0x0000000000004930 printf + .text.vprintf 0x0000000000004954 0x14 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + 0x0000000000004954 vprintf .text.flash_map_read_mfg - 0x0000000000004908 0x78 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004968 0x78 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) .text.flash_area_open - 0x0000000000004980 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004980 flash_area_open + 0x00000000000049e0 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x00000000000049e0 flash_area_open .text.flash_area_to_sectors - 0x00000000000049c0 0x7c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x00000000000049c0 flash_area_to_sectors + 0x0000000000004a20 0x7c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004a20 flash_area_to_sectors .text.flash_area_read - 0x0000000000004a3c 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004a3c flash_area_read + 0x0000000000004a9c 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004a9c flash_area_read .text.flash_area_write - 0x0000000000004a62 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004a62 flash_area_write + 0x0000000000004ac2 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004ac2 flash_area_write .text.flash_area_erase - 0x0000000000004a88 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004a88 flash_area_erase + 0x0000000000004ae8 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004ae8 flash_area_erase .text.flash_area_align - 0x0000000000004aae 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004aae flash_area_align + 0x0000000000004b0e 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004b0e flash_area_align .text.flash_area_erased_val - 0x0000000000004ab8 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004ab8 flash_area_erased_val + 0x0000000000004b18 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004b18 flash_area_erased_val .text.flash_area_read_is_empty - 0x0000000000004ac2 0xe /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004ac2 flash_area_read_is_empty + 0x0000000000004b22 0xe /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004b22 flash_area_read_is_empty .text.flash_map_init - 0x0000000000004ad0 0x5c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - 0x0000000000004ad0 flash_map_init + 0x0000000000004b30 0x5c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x0000000000004b30 flash_map_init .text.modlog_init - 0x0000000000004b2c 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) - 0x0000000000004b2c modlog_init - *fill* 0x0000000000004b2e 0x2 + 0x0000000000004b8c 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + 0x0000000000004b8c modlog_init + *fill* 0x0000000000004b8e 0x2 .text.mfg_seek_next_aux - 0x0000000000004b30 0x94 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004b90 0x94 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) .text.mfg_read_mmr - 0x0000000000004bc4 0x70 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004c24 0x70 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) .text.mfg_read_next_mmr - 0x0000000000004c34 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004c94 0x54 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) .text.mfg_open_flash_area - 0x0000000000004c88 0x3c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004ce8 0x3c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) .text.mfg_read_tlv_body - 0x0000000000004cc4 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004d24 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) .text.mfg_seek_next - 0x0000000000004d08 0x12 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - 0x0000000000004d08 mfg_seek_next + 0x0000000000004d68 0x12 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004d68 mfg_seek_next .text.mfg_seek_next_with_type - 0x0000000000004d1a 0x1a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - 0x0000000000004d1a mfg_seek_next_with_type + 0x0000000000004d7a 0x1a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004d7a mfg_seek_next_with_type .text.mfg_read_tlv_flash_area - 0x0000000000004d34 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - 0x0000000000004d34 mfg_read_tlv_flash_area + 0x0000000000004d94 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004d94 mfg_read_tlv_flash_area .text.mfg_read_tlv_mmr_ref - 0x0000000000004d3e 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - 0x0000000000004d3e mfg_read_tlv_mmr_ref + 0x0000000000004d9e 0xa /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004d9e mfg_read_tlv_mmr_ref .text.mfg_init - 0x0000000000004d48 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - 0x0000000000004d48 mfg_init + 0x0000000000004da8 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004da8 mfg_init .text.mfg_open - 0x0000000000004d6c 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - 0x0000000000004d6c mfg_open + 0x0000000000004dcc 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000004dcc mfg_open .text.mfg_read_mmr_refs - 0x0000000000004d7c 0x4e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - *fill* 0x0000000000004dca 0x2 - .text 0x0000000000004dcc 0x30 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_aeabi_uldivmod.o) - 0x0000000000004dcc __aeabi_uldivmod - .text 0x0000000000004dfc 0x2cc /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_udivmoddi4.o) - 0x0000000000004dfc __udivmoddi4 - .text 0x00000000000050c8 0x4 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_dvmd_tls.o) - 0x00000000000050c8 __aeabi_ldiv0 - 0x00000000000050c8 __aeabi_idiv0 + 0x0000000000004ddc 0x4e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + *fill* 0x0000000000004e2a 0x2 + .text 0x0000000000004e2c 0x30 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_aeabi_uldivmod.o) + 0x0000000000004e2c __aeabi_uldivmod + .text 0x0000000000004e5c 0x2cc /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_udivmoddi4.o) + 0x0000000000004e5c __udivmoddi4 + .text 0x0000000000005128 0x4 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_dvmd_tls.o) + 0x0000000000005128 __aeabi_ldiv0 + 0x0000000000005128 __aeabi_idiv0 *(.init) *(.fini) *crtbegin.o(.ctors) @@ -2128,155 +2130,156 @@ END GROUP *(.dtors) *(.rodata*) .rodata.flash_devs - 0x00000000000050cc 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(hal_bsp.o) + 0x000000000000512c 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(hal_bsp.o) .rodata.spiflash_characteristics - 0x00000000000050d4 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/drivers/flash/spiflash/hw_drivers_flash_spiflash.a(spiflash.o) + 0x0000000000005134 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/drivers/flash/spiflash/hw_drivers_flash_spiflash.a(spiflash.o) .rodata.spiflash_flash_funcs - 0x0000000000005104 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/drivers/flash/spiflash/hw_drivers_flash_spiflash.a(spiflash.o) + 0x0000000000005164 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/drivers/flash/spiflash/hw_drivers_flash_spiflash.a(spiflash.o) .rodata.nrf52k_flash_dev - 0x0000000000005120 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_flash.o) - 0x0000000000005120 nrf52k_flash_dev + 0x0000000000005180 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_flash.o) + 0x0000000000005180 nrf52k_flash_dev .rodata.nrf52k_flash_funcs - 0x0000000000005138 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_flash.o) + 0x0000000000005198 0x1c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_flash.o) .rodata.nrf52_hal_spis - 0x0000000000005154 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_spi.o) + 0x00000000000051b4 0xc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_spi.o) .rodata.os_bsp_spi0m_cfg - 0x0000000000005160 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(nrf52_periph.o) + 0x00000000000051c0 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(nrf52_periph.o) .rodata.nrf52_hal_timers - 0x0000000000005164 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_timer.o) + 0x00000000000051c4 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_timer.o) .rodata.__assert_func.str1.4 - 0x000000000000517c 0x27 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_fault.o) - *fill* 0x00000000000051a3 0x1 + 0x00000000000051dc 0x27 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_fault.o) + *fill* 0x0000000000005203 0x1 .rodata.os_default_irq.str1.4 - 0x00000000000051a4 0x148 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_fault.o) + 0x0000000000005204 0x148 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_fault.o) .rodata.os_msys_init.str1.4 - 0x00000000000052ec 0x7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_msys.o) - *fill* 0x00000000000052f3 0x1 + 0x000000000000534c 0x7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_msys.o) + *fill* 0x0000000000005353 0x1 .rodata.boot_custom_start.str1.4 - 0x00000000000052f4 0x11 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - *fill* 0x0000000000005305 0x3 + 0x0000000000005354 0x51 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + *fill* 0x00000000000053a5 0x3 .rodata.pinetime_boot_init.str1.4 - 0x0000000000005308 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + 0x00000000000053a8 0x2a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + *fill* 0x00000000000053d2 0x2 .rodata.COLMOD_PARA.7864 - 0x000000000000532c 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x000000000000532d 0x3 + 0x00000000000053d4 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053d5 0x3 .rodata.FRMCTR1_PARA.7852 - 0x0000000000005330 0x3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005333 0x1 + 0x00000000000053d8 0x3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053db 0x1 .rodata.FRMCTR2_PARA.7853 - 0x0000000000005334 0x3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005337 0x1 + 0x00000000000053dc 0x3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053df 0x1 .rodata.FRMCTR3_PARA.7854 - 0x0000000000005338 0x6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x000000000000533e 0x2 + 0x00000000000053e0 0x6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053e6 0x2 .rodata.INVCTR_PARA.7855 - 0x0000000000005340 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005341 0x3 + 0x00000000000053e8 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053e9 0x3 .rodata.MADCTL1_PARA.7862 - 0x0000000000005344 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005345 0x3 + 0x00000000000053ec 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053ed 0x3 .rodata.PWCTR1_PARA.7856 - 0x0000000000005348 0x3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x000000000000534b 0x1 + 0x00000000000053f0 0x3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053f3 0x1 .rodata.PWCTR2_PARA.7857 - 0x000000000000534c 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x000000000000534d 0x3 + 0x00000000000053f4 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053f5 0x3 .rodata.PWCTR3_PARA.7858 - 0x0000000000005350 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005352 0x2 + 0x00000000000053f8 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053fa 0x2 .rodata.PWCTR4_PARA.7859 - 0x0000000000005354 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005356 0x2 + 0x00000000000053fc 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x00000000000053fe 0x2 .rodata.PWCTR5_PARA.7860 - 0x0000000000005358 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x000000000000535a 0x2 + 0x0000000000005400 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x0000000000005402 0x2 .rodata.VMCTR1_PARA.7861 - 0x000000000000535c 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x000000000000535d 0x3 + 0x0000000000005404 0x1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x0000000000005405 0x3 .rodata.pinetime_boot_display_image.str1.4 - 0x0000000000005360 0x29 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - *fill* 0x0000000000005389 0x3 + 0x0000000000005408 0x29 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + *fill* 0x0000000000005431 0x3 .rodata.console_printf.str1.4 - 0x000000000000538c 0x7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - *fill* 0x0000000000005393 0x1 + 0x0000000000005434 0x7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + *fill* 0x000000000000543b 0x1 .rodata.boot_complete_partial_swap.str1.4 - 0x0000000000005394 0xd /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - *fill* 0x00000000000053a1 0x3 + 0x000000000000543c 0xd /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + *fill* 0x0000000000005449 0x3 .rodata.boot_prepare_image_for_update.str1.4 - 0x00000000000053a4 0xa0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x000000000000544c 0xa0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .rodata.boot_validate_slot.str1.4 - 0x0000000000005444 0x3e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - *fill* 0x0000000000005482 0x2 + 0x00000000000054ec 0x3e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + *fill* 0x000000000000552a 0x2 .rodata.context_boot_go.str1.4 - 0x0000000000005484 0x27 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - *fill* 0x00000000000054ab 0x1 + 0x000000000000552c 0x27 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + *fill* 0x0000000000005553 0x1 .rodata.boot_slots_compatible.str1.4 - 0x00000000000054ac 0xd3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - *fill* 0x000000000000557f 0x1 + 0x0000000000005554 0xd3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + *fill* 0x0000000000005627 0x1 .rodata.boot_status_tables - 0x0000000000005580 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x0000000000005628 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) .rodata.swap_read_status_bytes.str1.4 - 0x0000000000005590 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x0000000000005638 0x24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) .rodata.swap_status_source.str1.4 - 0x00000000000055b4 0xd4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .rodata 0x0000000000005688 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - *fill* 0x000000000000568a 0x2 + 0x000000000000565c 0xd4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .rodata 0x0000000000005730 0x2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + *fill* 0x0000000000005732 0x2 .rodata.boot_img_magic - 0x000000000000568c 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - 0x000000000000568c boot_img_magic + 0x0000000000005734 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000005734 boot_img_magic .rodata.boot_swap_tables - 0x000000000000569c 0x12 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - *fill* 0x00000000000056ae 0x2 + 0x0000000000005744 0x12 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + *fill* 0x0000000000005756 0x2 .rodata.boot_swap_type_multi.str1.4 - 0x00000000000056b0 0x46 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000005758 0x46 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) 0x5a (size before relaxing) - *fill* 0x00000000000056f6 0x2 - .rodata.K 0x00000000000056f8 0x100 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + *fill* 0x000000000000579e 0x2 + .rodata.K 0x00000000000057a0 0x100 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) .rodata.puts.str1.4 - 0x00000000000057f8 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + 0x00000000000058a0 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) 0x2 (size before relaxing) .rodata.stdout - 0x00000000000057f8 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - 0x00000000000057f8 stdout + 0x00000000000058a0 0x4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + 0x00000000000058a0 stdout .rodata.sysflash_map_dflt - 0x00000000000057fc 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) - 0x00000000000057fc sysflash_map_dflt + 0x00000000000058a4 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) + 0x00000000000058a4 sysflash_map_dflt *(.eh_frame*) - 0x0000000000005844 . = ALIGN (0x4) + 0x00000000000058ec . = ALIGN (0x4) -.glue_7 0x0000000000005844 0x0 - .glue_7 0x0000000000005844 0x0 linker stubs +.glue_7 0x00000000000058ec 0x0 + .glue_7 0x00000000000058ec 0x0 linker stubs -.glue_7t 0x0000000000005844 0x0 - .glue_7t 0x0000000000005844 0x0 linker stubs +.glue_7t 0x00000000000058ec 0x0 + .glue_7t 0x00000000000058ec 0x0 linker stubs -.vfp11_veneer 0x0000000000005844 0x0 - .vfp11_veneer 0x0000000000005844 0x0 linker stubs +.vfp11_veneer 0x00000000000058ec 0x0 + .vfp11_veneer 0x00000000000058ec 0x0 linker stubs -.v4_bx 0x0000000000005844 0x0 - .v4_bx 0x0000000000005844 0x0 linker stubs +.v4_bx 0x00000000000058ec 0x0 + .v4_bx 0x00000000000058ec 0x0 linker stubs -.iplt 0x0000000000005844 0x0 - .iplt 0x0000000000005844 0x0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) +.iplt 0x00000000000058ec 0x0 + .iplt 0x00000000000058ec 0x0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) -.ARM.extab 0x0000000000005844 0x0 +.ARM.extab 0x00000000000058ec 0x0 *(.ARM.extab* .gnu.linkonce.armextab.*) - 0x0000000000005844 . = ALIGN (0x4) - 0x0000000000005844 __exidx_start = . + 0x00000000000058ec . = ALIGN (0x4) + 0x00000000000058ec __exidx_start = . -.ARM.exidx 0x0000000000005844 0x18 +.ARM.exidx 0x00000000000058ec 0x18 *(.ARM.exidx* .gnu.linkonce.armexidx.*) - .ARM.exidx 0x0000000000005844 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) - .ARM.exidx 0x000000000000584c 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(HAL_CM4.o) + .ARM.exidx 0x00000000000058ec 0x8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) + .ARM.exidx 0x00000000000058f4 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(HAL_CM4.o) 0x30 (size before relaxing) - .ARM.exidx 0x000000000000585c 0x0 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_udivmoddi4.o) + .ARM.exidx 0x0000000000005904 0x0 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_udivmoddi4.o) 0x8 (size before relaxing) - 0x000000000000585c . = ALIGN (0x4) - 0x000000000000585c __exidx_end = . - 0x000000000000585c __etext = . + 0x0000000000005904 . = ALIGN (0x4) + 0x0000000000005904 __exidx_end = . + 0x0000000000005904 __etext = . -.rel.dyn 0x000000000000585c 0x0 - .rel.iplt 0x000000000000585c 0x0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) +.rel.dyn 0x0000000000005904 0x0 + .rel.iplt 0x0000000000005904 0x0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) .vector_relocation 0x0000000020000000 0xd8 @@ -2291,7 +2294,7 @@ END GROUP *(.rtt) 0x00000000200000d8 . = ALIGN (0x4) -.data 0x00000000200000d8 0x84 load address 0x000000000000585c +.data 0x00000000200000d8 0x84 load address 0x0000000000005904 0x00000000200000d8 __data_start__ = . *(vtable) *(.data*) @@ -2338,17 +2341,17 @@ END GROUP 0x000000002000015c . = ALIGN (0x4) 0x000000002000015c __data_end__ = . -.igot.plt 0x000000002000015c 0x0 load address 0x00000000000058e0 +.igot.plt 0x000000002000015c 0x0 load address 0x0000000000005988 .igot.plt 0x000000002000015c 0x0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) -.bssnz 0x000000002000015c 0x0 load address 0x00000000000058e0 +.bssnz 0x000000002000015c 0x0 load address 0x0000000000005988 0x000000002000015c . = ALIGN (0x4) 0x000000002000015c __bssnz_start__ = . *(.bss.core.nz*) 0x000000002000015c . = ALIGN (0x4) 0x000000002000015c __bssnz_end__ = . -.bss 0x000000002000015c 0x62c8 load address 0x00000000000058e0 +.bss 0x000000002000015c 0x62c8 load address 0x0000000000005988 0x000000002000015c . = ALIGN (0x4) 0x000000002000015c __bss_start__ = . *(.bss*) @@ -2421,7 +2424,7 @@ END GROUP 0x0000000020006428 . = ALIGN (0x8) 0x0000000020006428 __HeapBase = . -.stack_dummy 0x0000000020006428 0x1b0 load address 0x00000000000058e0 +.stack_dummy 0x0000000020006428 0x1b0 load address 0x0000000000005988 *(.stack*) .stack 0x0000000020006428 0x1b0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) 0x0000000020000000 _ram_start = ORIGIN (RAM) @@ -2630,7 +2633,7 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo 0x0000000000000000 SVC_Count 0x0000000000000000 SVC_Table -.debug_line 0x0000000000000000 0x11840 +.debug_line 0x0000000000000000 0x1187c .debug_line 0x0000000000000000 0x99 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) .debug_line 0x0000000000000099 0x68 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) .debug_line 0x0000000000000101 0x234 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system.o) @@ -2663,36 +2666,36 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_line 0x00000000000094ed 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcmp.o) .debug_line 0x00000000000095bd 0xd3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcpy.o) .debug_line 0x0000000000009690 0x225 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) - .debug_line 0x00000000000098b5 0x565 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - .debug_line 0x0000000000009e1a 0x654 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - .debug_line 0x000000000000a46e 0x5a6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - .debug_line 0x000000000000aa14 0x47a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - .debug_line 0x000000000000ae8e 0x6b7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - .debug_line 0x000000000000b545 0x468 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) - .debug_line 0x000000000000b9ad 0x45f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - .debug_line 0x000000000000be0c 0x565 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - .debug_line 0x000000000000c371 0x74 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) - .debug_line 0x000000000000c3e5 0x7c9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - .debug_line 0x000000000000cbae 0x41c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - .debug_line 0x000000000000cfca 0x6c5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .debug_line 0x000000000000d68f 0x5c4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - .debug_line 0x000000000000dc53 0x545 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - .debug_line 0x000000000000e198 0x273 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - .debug_line 0x000000000000e40b 0x1e3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - .debug_line 0x000000000000e5ee 0x60e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - .debug_line 0x000000000000ebfc 0x637 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - .debug_line 0x000000000000f233 0x25d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - .debug_line 0x000000000000f490 0x3ae /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - .debug_line 0x000000000000f83e 0x466 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .debug_line 0x000000000000fca4 0xcf /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - .debug_line 0x000000000000fd73 0x62f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .debug_line 0x00000000000103a2 0x121 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - .debug_line 0x00000000000104c3 0x6e3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - .debug_line 0x0000000000010ba6 0x4a7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) - .debug_line 0x000000000001104d 0x645 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - .debug_line 0x0000000000011692 0x1ae /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) + .debug_line 0x00000000000098b5 0x5a1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + .debug_line 0x0000000000009e56 0x654 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_line 0x000000000000a4aa 0x5a6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_line 0x000000000000aa50 0x47a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_line 0x000000000000aeca 0x6b7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_line 0x000000000000b581 0x468 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + .debug_line 0x000000000000b9e9 0x45f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_line 0x000000000000be48 0x565 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_line 0x000000000000c3ad 0x74 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + .debug_line 0x000000000000c421 0x7c9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_line 0x000000000000cbea 0x41c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_line 0x000000000000d006 0x6c5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_line 0x000000000000d6cb 0x5c4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_line 0x000000000000dc8f 0x545 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_line 0x000000000000e1d4 0x273 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_line 0x000000000000e447 0x1e3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_line 0x000000000000e62a 0x60e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_line 0x000000000000ec38 0x637 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_line 0x000000000000f26f 0x25d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_line 0x000000000000f4cc 0x3ae /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_line 0x000000000000f87a 0x466 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_line 0x000000000000fce0 0xcf /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_line 0x000000000000fdaf 0x62f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_line 0x00000000000103de 0x121 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_line 0x00000000000104ff 0x6e3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_line 0x0000000000010be2 0x4a7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + .debug_line 0x0000000000011089 0x645 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_line 0x00000000000116ce 0x1ae /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) -.debug_info 0x0000000000000000 0x2a0a0 +.debug_info 0x0000000000000000 0x2a19f .debug_info 0x0000000000000000 0x26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) .debug_info 0x0000000000000026 0x119 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) .debug_info 0x000000000000013f 0x8cb /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system.o) @@ -2725,36 +2728,36 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_info 0x0000000000017a3c 0xa0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcmp.o) .debug_info 0x0000000000017adc 0xf4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcpy.o) .debug_info 0x0000000000017bd0 0x123 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) - .debug_info 0x0000000000017cf3 0x925 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - .debug_info 0x0000000000018618 0x129e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - .debug_info 0x00000000000198b6 0xb34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - .debug_info 0x000000000001a3ea 0x6a9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - .debug_info 0x000000000001aa93 0x103f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - .debug_info 0x000000000001bad2 0x612 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) - .debug_info 0x000000000001c0e4 0x699 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - .debug_info 0x000000000001c77d 0xeb3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - .debug_info 0x000000000001d630 0xb4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) - .debug_info 0x000000000001d6e4 0x1c75 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - .debug_info 0x000000000001f359 0xb26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - .debug_info 0x000000000001fe7f 0x164b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .debug_info 0x00000000000214ca 0x125a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - .debug_info 0x0000000000022724 0xd04 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - .debug_info 0x0000000000023428 0x42f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - .debug_info 0x0000000000023857 0x1a7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - .debug_info 0x00000000000239fe 0xcd8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - .debug_info 0x00000000000246d6 0xfb8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - .debug_info 0x000000000002568e 0x2f3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - .debug_info 0x0000000000025981 0x89d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - .debug_info 0x000000000002621e 0x6b4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .debug_info 0x00000000000268d2 0x94 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - .debug_info 0x0000000000026966 0x1016 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .debug_info 0x000000000002797c 0x1b0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - .debug_info 0x0000000000027b2c 0x10ee /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - .debug_info 0x0000000000028c1a 0x619 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) - .debug_info 0x0000000000029233 0xd29 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - .debug_info 0x0000000000029f5c 0x144 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) + .debug_info 0x0000000000017cf3 0xa24 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + .debug_info 0x0000000000018717 0x129e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_info 0x00000000000199b5 0xb34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_info 0x000000000001a4e9 0x6a9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_info 0x000000000001ab92 0x103f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_info 0x000000000001bbd1 0x612 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + .debug_info 0x000000000001c1e3 0x699 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_info 0x000000000001c87c 0xeb3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_info 0x000000000001d72f 0xb4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + .debug_info 0x000000000001d7e3 0x1c75 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_info 0x000000000001f458 0xb26 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_info 0x000000000001ff7e 0x164b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_info 0x00000000000215c9 0x125a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_info 0x0000000000022823 0xd04 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_info 0x0000000000023527 0x42f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_info 0x0000000000023956 0x1a7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_info 0x0000000000023afd 0xcd8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_info 0x00000000000247d5 0xfb8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_info 0x000000000002578d 0x2f3 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_info 0x0000000000025a80 0x89d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_info 0x000000000002631d 0x6b4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_info 0x00000000000269d1 0x94 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_info 0x0000000000026a65 0x1016 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_info 0x0000000000027a7b 0x1b0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_info 0x0000000000027c2b 0x10ee /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_info 0x0000000000028d19 0x619 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + .debug_info 0x0000000000029332 0xd29 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_info 0x000000000002a05b 0x144 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) -.debug_abbrev 0x0000000000000000 0x7631 +.debug_abbrev 0x0000000000000000 0x7670 .debug_abbrev 0x0000000000000000 0x14 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) .debug_abbrev 0x0000000000000014 0xb9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) .debug_abbrev 0x00000000000000cd 0x1cb /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system.o) @@ -2787,36 +2790,36 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_abbrev 0x000000000000403b 0x8e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcmp.o) .debug_abbrev 0x00000000000040c9 0x8d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcpy.o) .debug_abbrev 0x0000000000004156 0xb9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) - .debug_abbrev 0x000000000000420f 0x19a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - .debug_abbrev 0x00000000000043a9 0x276 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - .debug_abbrev 0x000000000000461f 0x218 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - .debug_abbrev 0x0000000000004837 0x17e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - .debug_abbrev 0x00000000000049b5 0x30d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - .debug_abbrev 0x0000000000004cc2 0x124 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) - .debug_abbrev 0x0000000000004de6 0x18f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - .debug_abbrev 0x0000000000004f75 0x254 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - .debug_abbrev 0x00000000000051c9 0x4a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) - .debug_abbrev 0x0000000000005213 0x33b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - .debug_abbrev 0x000000000000554e 0x1de /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - .debug_abbrev 0x000000000000572c 0x320 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .debug_abbrev 0x0000000000005a4c 0x29b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - .debug_abbrev 0x0000000000005ce7 0x217 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - .debug_abbrev 0x0000000000005efe 0x142 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - .debug_abbrev 0x0000000000006040 0xdc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - .debug_abbrev 0x000000000000611c 0x249 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - .debug_abbrev 0x0000000000006365 0x2a1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - .debug_abbrev 0x0000000000006606 0x1af /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - .debug_abbrev 0x00000000000067b5 0x18b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - .debug_abbrev 0x0000000000006940 0x15d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .debug_abbrev 0x0000000000006a9d 0x81 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - .debug_abbrev 0x0000000000006b1e 0x337 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .debug_abbrev 0x0000000000006e55 0x10d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - .debug_abbrev 0x0000000000006f62 0x2a5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - .debug_abbrev 0x0000000000007207 0x108 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) - .debug_abbrev 0x000000000000730f 0x291 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - .debug_abbrev 0x00000000000075a0 0x91 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) + .debug_abbrev 0x000000000000420f 0x1d9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + .debug_abbrev 0x00000000000043e8 0x276 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_abbrev 0x000000000000465e 0x218 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_abbrev 0x0000000000004876 0x17e /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_abbrev 0x00000000000049f4 0x30d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_abbrev 0x0000000000004d01 0x124 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + .debug_abbrev 0x0000000000004e25 0x18f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_abbrev 0x0000000000004fb4 0x254 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_abbrev 0x0000000000005208 0x4a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + .debug_abbrev 0x0000000000005252 0x33b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_abbrev 0x000000000000558d 0x1de /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_abbrev 0x000000000000576b 0x320 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_abbrev 0x0000000000005a8b 0x29b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_abbrev 0x0000000000005d26 0x217 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_abbrev 0x0000000000005f3d 0x142 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_abbrev 0x000000000000607f 0xdc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_abbrev 0x000000000000615b 0x249 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_abbrev 0x00000000000063a4 0x2a1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_abbrev 0x0000000000006645 0x1af /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_abbrev 0x00000000000067f4 0x18b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_abbrev 0x000000000000697f 0x15d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_abbrev 0x0000000000006adc 0x81 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_abbrev 0x0000000000006b5d 0x337 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_abbrev 0x0000000000006e94 0x10d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_abbrev 0x0000000000006fa1 0x2a5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_abbrev 0x0000000000007246 0x108 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + .debug_abbrev 0x000000000000734e 0x291 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_abbrev 0x00000000000075df 0x91 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) -.debug_aranges 0x0000000000000000 0x1508 +.debug_aranges 0x0000000000000000 0x1510 .debug_aranges 0x0000000000000000 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) .debug_aranges @@ -2882,63 +2885,63 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_aranges 0x0000000000000ad8 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) .debug_aranges - 0x0000000000000af8 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + 0x0000000000000af8 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) .debug_aranges - 0x0000000000000b28 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + 0x0000000000000b30 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) .debug_aranges - 0x0000000000000b88 0x98 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + 0x0000000000000b90 0x98 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) .debug_aranges - 0x0000000000000c20 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + 0x0000000000000c28 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) .debug_aranges - 0x0000000000000c40 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + 0x0000000000000c48 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) .debug_aranges - 0x0000000000000d00 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + 0x0000000000000d08 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) .debug_aranges - 0x0000000000000d30 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + 0x0000000000000d38 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) .debug_aranges - 0x0000000000000d68 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + 0x0000000000000d70 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) .debug_aranges - 0x0000000000000dc0 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + 0x0000000000000dc8 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) .debug_aranges - 0x0000000000000de0 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + 0x0000000000000de8 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) .debug_aranges - 0x0000000000000eb0 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + 0x0000000000000eb8 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) .debug_aranges - 0x0000000000000ef0 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + 0x0000000000000ef8 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) .debug_aranges - 0x0000000000000f48 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + 0x0000000000000f50 0xd0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) .debug_aranges - 0x0000000000001018 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + 0x0000000000001020 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) .debug_aranges - 0x0000000000001040 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + 0x0000000000001048 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) .debug_aranges - 0x0000000000001068 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + 0x0000000000001070 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) .debug_aranges - 0x0000000000001090 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + 0x0000000000001098 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) .debug_aranges - 0x0000000000001110 0x88 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + 0x0000000000001118 0x88 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) .debug_aranges - 0x0000000000001198 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + 0x00000000000011a0 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) .debug_aranges - 0x00000000000011c0 0x118 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + 0x00000000000011c8 0x118 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) .debug_aranges - 0x00000000000012d8 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + 0x00000000000012e0 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) .debug_aranges - 0x0000000000001300 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + 0x0000000000001308 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) .debug_aranges - 0x0000000000001320 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + 0x0000000000001328 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) .debug_aranges - 0x00000000000013a0 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + 0x00000000000013a8 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) .debug_aranges - 0x00000000000013c0 0x90 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + 0x00000000000013c8 0x90 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) .debug_aranges - 0x0000000000001450 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + 0x0000000000001458 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) .debug_aranges - 0x0000000000001470 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + 0x0000000000001478 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) .debug_aranges - 0x00000000000014f0 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) + 0x00000000000014f8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) -.debug_str 0x0000000000000000 0x621d +.debug_str 0x0000000000000000 0x6256 .debug_str 0x0000000000000000 0x6d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(gcc_startup_nrf52.o) .debug_str 0x000000000000006d 0x156 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) 0x1c5 (size before relaxing) @@ -3002,64 +3005,64 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo 0x1b3 (size before relaxing) .debug_str 0x00000000000041c4 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) 0x1f6 (size before relaxing) - .debug_str 0x00000000000041f8 0x90 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - 0x75c (size before relaxing) - .debug_str 0x0000000000004288 0x185 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_str 0x00000000000041f8 0xe9 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + 0x7e0 (size before relaxing) + .debug_str 0x00000000000042e1 0x185 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) 0x774 (size before relaxing) - .debug_str 0x000000000000440d 0x1e4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_str 0x0000000000004466 0x1e4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) 0x8c1 (size before relaxing) - .debug_str 0x00000000000045f1 0x6d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_str 0x000000000000464a 0x6d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) 0x5d6 (size before relaxing) - .debug_str 0x000000000000465e 0x172 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_str 0x00000000000046b7 0x172 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) 0x944 (size before relaxing) - .debug_str 0x00000000000047d0 0x51 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + .debug_str 0x0000000000004829 0x51 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) 0x59d (size before relaxing) - .debug_str 0x0000000000004821 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_str 0x000000000000487a 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) 0x59e (size before relaxing) - .debug_str 0x0000000000004881 0xe7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_str 0x00000000000048da 0xe7 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) 0x8c9 (size before relaxing) - .debug_str 0x0000000000004968 0x62 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + .debug_str 0x00000000000049c1 0x62 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) 0x17a (size before relaxing) - .debug_str 0x00000000000049ca 0x57c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_str 0x0000000000004a23 0x57c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) 0x978 (size before relaxing) - .debug_str 0x0000000000004f46 0x1d1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_str 0x0000000000004f9f 0x1d1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) 0x63e (size before relaxing) - .debug_str 0x0000000000005117 0x2a5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_str 0x0000000000005170 0x2a5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) 0x904 (size before relaxing) - .debug_str 0x00000000000053bc 0x1f2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_str 0x0000000000005415 0x1f2 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) 0x732 (size before relaxing) - .debug_str 0x00000000000055ae 0x224 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_str 0x0000000000005607 0x224 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) 0x83d (size before relaxing) - .debug_str 0x00000000000057d2 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_str 0x000000000000582b 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) 0x397 (size before relaxing) - .debug_str 0x0000000000005816 0x67 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_str 0x000000000000586f 0x67 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) 0x2ab (size before relaxing) - .debug_str 0x000000000000587d 0x133 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_str 0x00000000000058d6 0x133 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) 0x70e (size before relaxing) - .debug_str 0x00000000000059b0 0x154 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_str 0x0000000000005a09 0x134 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) 0x77d (size before relaxing) - .debug_str 0x0000000000005b04 0x6d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_str 0x0000000000005b3d 0x6d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) 0x2f1 (size before relaxing) - .debug_str 0x0000000000005b71 0x11b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_str 0x0000000000005baa 0x11b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) 0x2cc (size before relaxing) - .debug_str 0x0000000000005c8c 0x5b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_str 0x0000000000005cc5 0x5b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) 0x5aa (size before relaxing) - .debug_str 0x0000000000005ce7 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_str 0x0000000000005d20 0x34 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) 0x14a (size before relaxing) - .debug_str 0x0000000000005d1b 0xa5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_str 0x0000000000005d54 0xa5 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) 0x64b (size before relaxing) - .debug_str 0x0000000000005dc0 0x35 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_str 0x0000000000005df9 0x35 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) 0x1be (size before relaxing) - .debug_str 0x0000000000005df5 0x202 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_str 0x0000000000005e2e 0x202 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) 0x993 (size before relaxing) - .debug_str 0x0000000000005ff7 0x9b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + .debug_str 0x0000000000006030 0x9b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) 0x5ae (size before relaxing) - .debug_str 0x0000000000006092 0x150 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_str 0x00000000000060cb 0x150 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) 0x7cf (size before relaxing) - .debug_str 0x00000000000061e2 0x3b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) + .debug_str 0x000000000000621b 0x3b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysflash.o) 0x242 (size before relaxing) -.debug_loc 0x0000000000000000 0xf72e +.debug_loc 0x0000000000000000 0xf7e8 .debug_loc 0x0000000000000000 0x8d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) .debug_loc 0x000000000000008d 0x13 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(start.o) .debug_loc 0x00000000000000a0 0x6b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/boot_mynewt.a(main.o) @@ -3087,32 +3090,32 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_loc 0x0000000000007a8e 0x3ee /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/kernel/os/kernel_os.a(os_mutex.o) .debug_loc 0x0000000000007e7c 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcmp.o) .debug_loc 0x0000000000007ebc 0x39 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) - .debug_loc 0x0000000000007ef5 0x7a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - .debug_loc 0x0000000000007f6f 0x5a8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - .debug_loc 0x0000000000008517 0x109 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - .debug_loc 0x0000000000008620 0x51 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - .debug_loc 0x0000000000008671 0x54a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - .debug_loc 0x0000000000008bbb 0x84 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - .debug_loc 0x0000000000008c3f 0x6b4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - .debug_loc 0x00000000000092f3 0x10ed /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - .debug_loc 0x000000000000a3e0 0x3fd /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - .debug_loc 0x000000000000a7dd 0xe6b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .debug_loc 0x000000000000b648 0x987 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - .debug_loc 0x000000000000bfcf 0x44d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - .debug_loc 0x000000000000c41c 0x2fb /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - .debug_loc 0x000000000000c717 0xa6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - .debug_loc 0x000000000000c7bd 0x5f1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - .debug_loc 0x000000000000cdae 0x803 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - .debug_loc 0x000000000000d5b1 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - .debug_loc 0x000000000000d5f1 0x751 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - .debug_loc 0x000000000000dd42 0x8c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .debug_loc 0x000000000000ddce 0x3f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - .debug_loc 0x000000000000de0d 0xaac /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .debug_loc 0x000000000000e8b9 0x3f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - .debug_loc 0x000000000000e8f8 0x90a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - .debug_loc 0x000000000000f202 0x52c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_loc 0x0000000000007ef5 0x134 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + .debug_loc 0x0000000000008029 0x5a8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_loc 0x00000000000085d1 0x109 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_loc 0x00000000000086da 0x51 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_loc 0x000000000000872b 0x54a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_loc 0x0000000000008c75 0x84 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_loc 0x0000000000008cf9 0x6b4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_loc 0x00000000000093ad 0x10ed /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_loc 0x000000000000a49a 0x3fd /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_loc 0x000000000000a897 0xe6b /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_loc 0x000000000000b702 0x987 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_loc 0x000000000000c089 0x44d /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_loc 0x000000000000c4d6 0x2fb /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_loc 0x000000000000c7d1 0xa6 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_loc 0x000000000000c877 0x5f1 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_loc 0x000000000000ce68 0x803 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_loc 0x000000000000d66b 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_loc 0x000000000000d6ab 0x751 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_loc 0x000000000000ddfc 0x8c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_loc 0x000000000000de88 0x3f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_loc 0x000000000000dec7 0xaac /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_loc 0x000000000000e973 0x3f /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_loc 0x000000000000e9b2 0x90a /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_loc 0x000000000000f2bc 0x52c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) -.debug_ranges 0x0000000000000000 0x12a8 +.debug_ranges 0x0000000000000000 0x12c8 .debug_ranges 0x0000000000000000 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) .debug_ranges 0x0000000000000018 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system.o) .debug_ranges 0x0000000000000040 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(system_nrf52.o) @@ -3143,35 +3146,35 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_ranges 0x0000000000000968 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcmp.o) .debug_ranges 0x0000000000000978 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcpy.o) .debug_ranges 0x0000000000000988 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) - .debug_ranges 0x0000000000000998 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - .debug_ranges 0x00000000000009b8 0x98 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - .debug_ranges 0x0000000000000a50 0x88 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - .debug_ranges 0x0000000000000ad8 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - .debug_ranges 0x0000000000000ae8 0xe0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - .debug_ranges 0x0000000000000bc8 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) - .debug_ranges 0x0000000000000be8 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - .debug_ranges 0x0000000000000c10 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - .debug_ranges 0x0000000000000c58 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) - .debug_ranges 0x0000000000000c68 0xf8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - .debug_ranges 0x0000000000000d60 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - .debug_ranges 0x0000000000000d90 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .debug_ranges 0x0000000000000dd8 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - .debug_ranges 0x0000000000000e98 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - .debug_ranges 0x0000000000000eb0 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - .debug_ranges 0x0000000000000ec8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - .debug_ranges 0x0000000000000ee0 0x70 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - .debug_ranges 0x0000000000000f50 0x78 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - .debug_ranges 0x0000000000000fc8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - .debug_ranges 0x0000000000000fe0 0x108 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - .debug_ranges 0x00000000000010e8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .debug_ranges 0x0000000000001100 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - .debug_ranges 0x0000000000001110 0x88 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .debug_ranges 0x0000000000001198 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - .debug_ranges 0x00000000000011a8 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - .debug_ranges 0x0000000000001228 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) - .debug_ranges 0x0000000000001238 0x70 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_ranges 0x0000000000000998 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + .debug_ranges 0x00000000000009d8 0x98 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_ranges 0x0000000000000a70 0x88 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_ranges 0x0000000000000af8 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_ranges 0x0000000000000b08 0xe0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_ranges 0x0000000000000be8 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + .debug_ranges 0x0000000000000c08 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_ranges 0x0000000000000c30 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_ranges 0x0000000000000c78 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + .debug_ranges 0x0000000000000c88 0xf8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_ranges 0x0000000000000d80 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_ranges 0x0000000000000db0 0x48 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_ranges 0x0000000000000df8 0xc0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_ranges 0x0000000000000eb8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_ranges 0x0000000000000ed0 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_ranges 0x0000000000000ee8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_ranges 0x0000000000000f00 0x70 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_ranges 0x0000000000000f70 0x78 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_ranges 0x0000000000000fe8 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_ranges 0x0000000000001000 0x108 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_ranges 0x0000000000001108 0x18 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_ranges 0x0000000000001120 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_ranges 0x0000000000001130 0x88 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_ranges 0x00000000000011b8 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_ranges 0x00000000000011c8 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_ranges 0x0000000000001248 0x10 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + .debug_ranges 0x0000000000001258 0x70 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) -.debug_frame 0x0000000000000000 0x3660 +.debug_frame 0x0000000000000000 0x3684 .debug_frame 0x0000000000000000 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/bsp/nrf52/hw_bsp_nrf52.a(sbrk.o) .debug_frame 0x0000000000000030 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system.o) .debug_frame 0x0000000000000088 0xb8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(system_nrf52.o) @@ -3202,32 +3205,32 @@ OUTPUT(/Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boo .debug_frame 0x0000000000001a7c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcmp.o) .debug_frame 0x0000000000001a9c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memcpy.o) .debug_frame 0x0000000000001abc 0x2c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(memset.o) - .debug_frame 0x0000000000001ae8 0x5c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) - .debug_frame 0x0000000000001b44 0x11c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) - .debug_frame 0x0000000000001c60 0x154 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) - .debug_frame 0x0000000000001db4 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) - .debug_frame 0x0000000000001df8 0x224 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) - .debug_frame 0x000000000000201c 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) - .debug_frame 0x000000000000205c 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) - .debug_frame 0x00000000000020b4 0x118 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) - .debug_frame 0x00000000000021cc 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) - .debug_frame 0x00000000000021f4 0x2d8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) - .debug_frame 0x00000000000024cc 0xbc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) - .debug_frame 0x0000000000002588 0x130 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) - .debug_frame 0x00000000000026b8 0x284 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) - .debug_frame 0x000000000000293c 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) - .debug_frame 0x000000000000299c 0x78 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) - .debug_frame 0x0000000000002a14 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) - .debug_frame 0x0000000000002a44 0x178 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) - .debug_frame 0x0000000000002bbc 0x1a4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) - .debug_frame 0x0000000000002d60 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) - .debug_frame 0x0000000000002d98 0x2a8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) - .debug_frame 0x0000000000003040 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) - .debug_frame 0x0000000000003078 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) - .debug_frame 0x0000000000003098 0x1cc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) - .debug_frame 0x0000000000003264 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) - .debug_frame 0x000000000000328c 0x1e0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) - .debug_frame 0x000000000000346c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) - .debug_frame 0x000000000000348c 0x174 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) - .debug_frame 0x0000000000003600 0x2c /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_aeabi_uldivmod.o) - .debug_frame 0x000000000000362c 0x34 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_udivmoddi4.o) + .debug_frame 0x0000000000001ae8 0x80 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(pinetime_boot.o) + .debug_frame 0x0000000000001b68 0x11c /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/pinetime_boot/libs_pinetime_boot.a(display.o) + .debug_frame 0x0000000000001c84 0x154 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console.o) + .debug_frame 0x0000000000001dd8 0x44 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(console_fmt.o) + .debug_frame 0x0000000000001e1c 0x224 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(semihosting_console.o) + .debug_frame 0x0000000000002040 0x40 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libs/semihosting_console/libs_semihosting_console.a(ticks.o) + .debug_frame 0x0000000000002080 0x58 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/sysinit/sys_sysinit.a(sysinit.o) + .debug_frame 0x00000000000020d8 0x118 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/util/mem/util_mem.a(mem.o) + .debug_frame 0x00000000000021f0 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/generated/bin/nrf52_boot-sysinit-app.a(nrf52_boot-sysinit-app.o) + .debug_frame 0x0000000000002218 0x2d8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(loader.o) + .debug_frame 0x00000000000024f0 0xbc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_misc.o) + .debug_frame 0x00000000000025ac 0x130 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(swap_scratch.o) + .debug_frame 0x00000000000026dc 0x284 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(bootutil_misc.o) + .debug_frame 0x0000000000002960 0x60 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(image_validate.o) + .debug_frame 0x00000000000029c0 0x78 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/bootutil/boot_bootutil.a(tlv.o) + .debug_frame 0x0000000000002a38 0x30 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/boot/mynewt/flash_map_backend/boot_mynewt_flash_map_backend.a(flash_map_extended.o) + .debug_frame 0x0000000000002a68 0x178 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/crypto/mbedtls/crypto_mbedtls.a(sha256.o) + .debug_frame 0x0000000000002be0 0x1a4 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/hal/hw_hal.a(hal_flash.o) + .debug_frame 0x0000000000002d84 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/hw/mcu/nordic/nrf52xxx/hw_mcu_nordic_nrf52xxx.a(hal_system_start.o) + .debug_frame 0x0000000000002dbc 0x2a8 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(inline.o) + .debug_frame 0x0000000000003064 0x38 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(mynewt.o) + .debug_frame 0x000000000000309c 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(strlen.o) + .debug_frame 0x00000000000030bc 0x1cc /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(tinyprintf.o) + .debug_frame 0x0000000000003288 0x28 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/libc/baselibc/libc_baselibc.a(vprintf.o) + .debug_frame 0x00000000000032b0 0x1e0 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/flash_map/sys_flash_map.a(flash_map.o) + .debug_frame 0x0000000000003490 0x20 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/log/modlog/sys_log_modlog.a(modlog.o) + .debug_frame 0x00000000000034b0 0x174 /Users/Luppy/PineTime/pinetime-rust-mynewt/bin/targets/nrf52_boot/app/sys/mfg/sys_mfg.a(mfg.o) + .debug_frame 0x0000000000003624 0x2c /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_aeabi_uldivmod.o) + .debug_frame 0x0000000000003650 0x34 /usr/local/Cellar/arm-none-eabi-gcc/7-2018-q2-update/gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/libgcc.a(_udivmoddi4.o) diff --git a/targets/nrf52_boot/pkg.yml b/targets/nrf52_boot/pkg.yml index 23bbe422d..85f549cda 100644 --- a/targets/nrf52_boot/pkg.yml +++ b/targets/nrf52_boot/pkg.yml @@ -26,7 +26,7 @@ pkg.homepage: # Package Dependencies: MCUBoot is dependent on these drivers and libraries. pkg.deps: - "libs/semihosting_console" # Semihosting Console - - "libs/pinetime_boot" # Render boot graphic and check for rollback + - "libs/pinetime_boot" # Render boot graphic and check for rollback. Comment out for Stub Bootloader. # C compiler flags pkg.cflags: