This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU problem with SDK 14.2

my bootloader.hex is generated by  "nRF5_SDK_14.2.0_17b948a\examples\dfu\bootloader_secure_ble\pca10040\arm5_no_packs", my app.hex is generated by a modified blinky example. i modified the NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 247, BLE_GATT_ATT_MTU_DEFAULT is also modified to 247, MAX_RECV_LEN and MAX_SEND_LEN  are set to 200. the modified project seems to work well, it can send or receive up to 200 byte once. i also add the dfu service in my project. when i use the app.hex generaed by my project to make a image, the error comes out.

I wanted to use a "settings_page_generate.bat" to generate a settings.hex. the"settings_page_generate.bat" as follows:

::generate settings page for current image: app.hex
nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 settings.hex
pause

i got a error as follows:


D:\DFU\SDK14_2>nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-
version 2 --bl-settings-version 1 settings.hex
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 983, in <module>
File "site-packages\click\core.py", line 722, in __call__
File "site-packages\click\core.py", line 697, in main
File "site-packages\click\core.py", line 1066, in invoke
File "site-packages\click\core.py", line 1066, in invoke
File "site-packages\click\core.py", line 895, in invoke
File "site-packages\click\core.py", line 535, in invoke
File "nordicsemi\__main__.py", line 279, in generate
File "nordicsemi\dfu\bl_dfu_sett.py", line 165, in generate
File "nordicsemi\dfu\package.py", line 499, in normalize_firmware_to_bin
File "nordicsemi\dfu\nrfhex.py", line 80, in __init__
File "nordicsemi\dfu\nrfhex.py", line 94, in _removeuicr
MemoryError
Failed to execute script __main__

i noted that there is a memory error, how to debug this error?i can't find the file  "nordicsemi\__main__.py"  of other python files mentioned in the message.

Parents Reply
  • If you want a value to be retained trough a reset, then you should not place it in RAM. 

    We have two General Purpose retention registers(GPREGRET) on the nRF52832, which are retained through resets due to CPU lockup, SoftReset and wake up from System OFF, see Retained registers in the nRF52832 Product Specification. Note: The GPREGRET registers are 8-bit registers. 

    If the value needs to be retained through Power on resets, Brownout rests etc, then you should place the value at the end of flash. 

Children
No Data
Related