Skip to content

Commit

Permalink
Added flash area for bootloader assets
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed May 16, 2020
1 parent cd7c48d commit c71bf50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions hw/bsp/nrf52/bsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bsp.flash_map:
size: 464kB # Max size of Firmware Image
FLASH_AREA_IMAGE_1: # Standby Firmware Image
device: 1 # External SPI Flash
offset: 0x00000000 # Start of External SPI Flash
offset: 0x00040000
size: 464kB # Max size of Firmware Image
FLASH_AREA_IMAGE_SCRATCH: # Used by MCUBoot for swapping Active and Standby Firmware
device: 0 # Internal Flash ROM
Expand All @@ -62,8 +62,12 @@ bsp.flash_map:
device: 0 # Internal Flash ROM
offset: 0x00006000
size: 8kB
FLASH_AREA_BOOTLOADER_ASSET: # Bootloader Assets, like Boot Graphic
device: 1 # External SPI Flash
offset: 0x00000000 # Start of External SPI Flash
size: 256kB
FLASH_AREA_NFFS: # For user files
user_id: 1
device: 1 # External SPI Flash
offset: 0x00074000
size: 3632kB
offset: 0x000b4000
size: 3376kB
4 changes: 2 additions & 2 deletions libs/pinetime_boot/src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ static int transmit_spi(const uint8_t *data, uint16_t len) {

/// Sleep for the specified number of milliseconds
static void delay_ms(uint32_t ms) {
#if MYNEWT_VAL(OS_SCHEDULING) // If Task Scheduler is enabled...
#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
#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();
#endif // MYNEWT_VAL(OS_SCHEDULING)
Expand Down

0 comments on commit c71bf50

Please sign in to comment.