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

secure bootloader removing optimization not performing upgrading

Hi i am using sdk15.3 secure boot-loader example. i had change backend to cc310. without optimization i am able to upgrade code but when i am using optimization level 0 it stop upgrading with nrfutill 


C:\Users\Atul Uttam\Desktop\Cypherock\secure_Bootloader\nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10056_usb\ses>nrfutil dfu usb-serial -pkg app_dfu_package.zip -p COM18 -b 115200

Traceback (most recent call last):
File "nordicsemi\__main__.py", line 1464, in <module>
File "click\core.py", line 764, in __call__
File "click\core.py", line 717, in main
File "click\core.py", line 1137, in invoke
File "click\core.py", line 1137, in invoke
File "click\core.py", line 956, in invoke
File "click\core.py", line 555, in invoke
File "nordicsemi\__main__.py", line 1001, in usb_serial
File "nordicsemi\__main__.py", line 956, in do_serial
File "nordicsemi\dfu\dfu.py", line 129, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 102, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 295, in send_firmware
File "nordicsemi\dfu\dfu_transport_serial.py", line 427, in __select_data
File "nordicsemi\dfu\dfu_transport_serial.py", line 431, in __select_object
File "nordicsemi\dfu\dfu_transport_serial.py", line 125, in send_message
pc_ble_driver_py.exceptions.NordicSemiException: Writing to serial port failed: WriteFile failed (WindowsError(22, 'The device does not recognize the command.')). If MSD is enabled on the target device, try to disable it ref. wiki.segger.com/index.php
[13268] Failed to execute script __main__

Parents
  • Hi,

    The bootloader will not fit the allocated flash area (assuming default settings) without code optimization enabled. Please try to lower the bootloader start address as shown in screendump below and see if it helps. Note that the linker will not give you any errors if the code starts to grow into the MBR param page and bootloader settings page (Memory layout) because of the way sections are set up in flash_placement.xml.

Reply
  • Hi,

    The bootloader will not fit the allocated flash area (assuming default settings) without code optimization enabled. Please try to lower the bootloader start address as shown in screendump below and see if it helps. Note that the linker will not give you any errors if the code starts to grow into the MBR param page and bootloader settings page (Memory layout) because of the way sections are set up in flash_placement.xml.

Children
Related