makerdiary / nrf52840-mdk

An Open-Source, Micro Development Kit for IoT Applications using the nRF52840 SoC
https://wiki.makerdiary.com/nrf52840-mdk/
171 stars 42 forks source link

The example HEX file is invalid. #34

Open zorange-CN opened 4 years ago

zorange-CN commented 4 years ago

I try to flash or mergehex ble_app_blinky_nrf52840_mdk_s140.hex or ble_app_hrs_nrf52840_mdk_s140.hex, it's failed.

mergehex -m s140_nrf52_7.0.1_softdevice.hex ble_app_blinky_nrf52840_mdk_s140.hex -o test.hex Parsing input hex files. ERROR: One of the files to merge is not a valid hex file.

pyocd-flashtool -t nrf52 -se ble_app_blinky_nrf52840_mdk_s140.hex WARNING:pyocd.tools.flash_tool:pyocd-flashtool is deprecated; please use the new combined pyocd tool. WARNING:pyocd.probe.common:STLink and CMSIS-DAPv2 probes are not supported because no libusb library was found. INFO:pyocd.board.board:Target type is nrf52 INFO:pyocd.coresight.dap:DP IDR = 0x2ba01477 (v1 rev2) INFO:pyocd.coresight.ap:AP#0 IDR = 0x24770011 (AHB-AP var1 rev2) INFO:pyocd.coresight.ap:AP#1 IDR = 0x02880000 (proprietary) INFO:pyocd.target.family.target_nRF52:NRF52832 not in secure state INFO:pyocd.coresight.rom_table:AP#0 ROM table #0 @ 0xe00ff000 (designer=244 part=008) INFO:pyocd.coresight.rom_table:[0]<e000e000:SCS-M4 class=14 designer=43b part=00c> INFO:pyocd.coresight.rom_table:[1]<e0001000:DWT class=14 designer=43b part=002> INFO:pyocd.coresight.rom_table:[2]<e0002000:FPB class=14 designer=43b part=003> INFO:pyocd.coresight.rom_table:[3]<e0000000:ITM class=14 designer=43b part=001> INFO:pyocd.coresight.rom_table:[4]<e0040000:TPIU-M4 class=9 designer=43b part=9a1 devtype=11 archid=0000 devid=0:0:ca1> INFO:pyocd.coresight.rom_table:[5]<e0041000:ETM-M4 class=9 designer=43b part=925 devtype=13 archid=0000 devid=0:0:0> INFO:pyocd.coresight.cortex_m:CPU core #0 is Cortex-M4 r0p1 INFO:pyocd.coresight.cortex_m:FPU present: FPv4-SP INFO:pyocd.coresight.dwt:4 hardware watchpoints INFO:pyocd.coresight.fpb:6 hardware breakpoints, 4 literal comparators raise HexRecordError(line=line) intelhex.HexRecordError: Hex file contains invalid record at line 7

But I can flash the s140_nrf52_7.0.1_softdevice.hex in same way.

caizelin commented 4 years ago

@zorange-CN The ble_app_blinky_nrf52840_mdk_s140.hex or any hex files with _s140 suffix contains the s140 softdevice. So there is no need to merge another softdevice again. Just flash it and it will run.