Dear Sir,
I am working on Bootloader of nRF52840 which I need large space to display some LCD when bootloader startup.
I use Keil compiler, SDK 1702.
In Keil, iROM set start address from 0xE0000. So from 0xE0000 to 0xFE000, it should have 122.88k.
From Keil compiled result, I got
Build target 'nrf52840_xxaa_s140'
linking...
Program Size: Code=32732 RO-data=53448 RW-data=300 ZI-data=32584
FromELF: creating hex file...
".\_build\RemoteBootloader840.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:03
After program Softdevice, Main App and Bootlaoder to development board, start DFU will get the following debug print from RTT Viewer.
00> <info> app: Inside main
00> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
00> <info> app: No firmware to activate.
00> <info> app: check if key press
00> <info> app: DFU mode requested via button.
00> <info> nrf_bootloader_wdt: WDT is not enabled
00> <info> app: Entering DFU mode.
00> <info> nrf_dfu_validation: Signature required. Checking signature.
00> <info> nrf_dfu_validation: Calculating hash (len: 64)
00> <info> nrf_dfu_validation: Verify signature
00> <info> nrf_dfu_validation: Image verified
00> <error> nrf_dfu_validation: BL size (118876) over limit (114688)
00> <error> nrf_dfu_validation: Init packet does not contain valid firmware size
00> <warning> nrf_dfu_ble: DFU request 4 failed with error: 0x4
00> <info> app: display LCD image
00> <info> app: Inside main
00> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
00> <info> app: No firmware to activate.
Why the BL size is118876?
How this size calculated?
and why the limit is only 114688?
Then if I change the Starting address from 0xDE000,
Keil result is
Program Size: Code=32732 RO-data=53448 RW-data=300 ZI-data=32584
And debug printing become
00> <error> nrf_dfu_validation: BL size (135260) over limit (131072)
Thanks so much!
Martin