NCS OpenThread CLI Sample program

Hi

Compile the cli sample into a hex file,Download it to the board, read the hex file through the nRF Connect for Desktop Programmer tool, and then convert it to the bin file through the hex2bin tool. Compared with the original bin file, it is found that the last six bytes of the flash application partition have 00 00 00 00 AF changes

I'm worried that this problem will damage the flash

Parents Reply Children
  • Hi

    I built through NCS18.0

    Sorry, the screenshot is the flash after the partition is modified,The following figure shows the flash changes before modifying the partition,

    The following figure shows my current flash partition. CLI programs are stored in the application partition,The storage partition is used to store the data generated by the CLI program,(075FF2) The address belongs to the application partition,But it is written to 00 00 00 00 00 AF, so I'm worried that the CLI may not work properly

    As you said, if 00 00 00 00 00 AF is the flag of the storage partition, I don't think it will damage the flash

    Thank you very much for your answer

  • Hi

    I conducted a data write test from cli to flash, and found that the data storage location is 0x75000 to 0x77000, and different from the pm_static.yml I defined. Why

    Looking forward to your reply

  • Hi,

    Are you sure that the pm_static.yml file is being used? See configuring static partitions.

    What is the output from west build -t partition_manager_report ?

    Best regards,
    Jørgen

  • E:\ncs18\nrf\samples\openthread\cli> west build -t partition_manager_report --board=nrf52833dk_nrf52833
    -- west build: generating a build system
    Including boilerplate (Zephyr base (cached)): E:/ncs18/zephyr/cmake/app/boilerplate.cmake
    -- Application: E:/ncs18/nrf/samples/openthread/cli
    -- Zephyr version: 2.7.0 (E:/ncs18/zephyr), build: v2.7.0-ncs1
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: E:/ncs18/zephyr/.cache
    -- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/gnuarmemb)
    -- Found BOARD.dts: E:/ncs18/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: E:/ncs18/nrf/samples/openthread/cli/boards/nrf52833dk_nrf52833.overlay
    nrf52833dk_nrf52833.dts.pre.tmp:57.26-59.5: Warning (simple_bus_reg): /soc/memory@20000000: simple-bus unit address format error, expected "20000008"
      also defined at nrf52833dk_nrf52833.dts.pre.tmp:412.8-414.3
      also defined at nrf52833dk_nrf52833.dts.pre.tmp:624.8-627.3
    unit address and first address in 'reg' (0x20000008) don't match for /soc/memory@20000000
    -- Generated zephyr.dts: E:/ncs18/nrf/samples/openthread/cli/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: E:/ncs18/nrf/samples/openthread/cli/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: E:/ncs18/nrf/samples/openthread/cli/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: E:/ncs18/nrf/samples/openthread/cli/build/zephyr/dts.cmake
    
    warning: Experimental symbol NET_CONNECTION_MANAGER is enabled.
    
    Parsing E:/ncs18/nrf/samples/openthread/cli/Kconfig
    Loaded configuration 'E:/ncs18/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'E:/ncs18/nrf/samples/openthread/cli/prj.conf'
    Configuration saved to 'E:/ncs18/nrf/samples/openthread/cli/build/zephyr/.config'
    Kconfig header saved to 'E:/ncs18/nrf/samples/openthread/cli/build/zephyr/include/generated/autoconf.h'
    C:\gnuarmemb\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    -- OpenThread Source Directory: E:/ncs18/modules/lib/openthread
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Searching 16 bit integer - Using unsigned short
    -- Check if the system is big endian - little endian
    -- Package Name: OPENTHREAD
    -- Package Version: v0.0.2
    CMake Warning at E:/ncs18/zephyr/CMakeLists.txt:1662 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Found partition manager static configuration: E:/ncs18/nrf/samples/openthread/cli/pm_static.yml
    Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: E:/ncs18/nrf/samples/openthread/cli/build
    -- west build: running target partition_manager_report
    [1/1] cmd.exe /C "cd /D E:\ncs18\nrf\samples\openthread\cl... E:/ncs18/nrf/samples/openthread/cli/build/partitions.yml"
      flash_primary (0x80000 - 512kB):
    +-----------------------------------------------+
    | 0x0: MBR (0x1000 - 4kB)                       |
    | 0x1000: app (0x75000 - 468kB)                 |
    | 0x76000: settings_storage (0x2000 - 8kB)      |
    | 0x78000: dfu_bootloader (0x6000 - 24kB)       |
    | 0x7e000: MBR_parameter_storage (0x1000 - 4kB) |
    | 0x7f000: Bootloader_settings (0x1000 - 4kB)   |
    +-----------------------------------------------+
    
      sram_primary (0x1fff8 - 127kB):
    +--------------------------------------------+
    | 0x20000008: sram_primary (0x1fff8 - 127kB) |
    +--------------------------------------------+
    

  • It looks correct. Did you perform an eraseall operation on the board before programming the new application? If the library finds existing pages in flash, it might reuse these instead of creating new pages. The library will not erase existing filled pages unless you explicitly does so in the application.

Related