DFU-UTIL errors?

Hi there,

Was wondering if anyone else was having issues with dfu-util flashing their mote.
Basically when trying to flash, it is able to download the .bin file to the mote, but it never boots back up post flash and cannot verify post download.

I can get back into bootloader mode but it never switches back to normal run mode…

I ordered a debugger cable to flash it via SWD but in the mean time, its feeling bricked.

Sorry Julian — that’s super frustrating!

The “Error during download get_status” can be safely ignored. I’ve seen that message for at least a decade in this industry. :person_shrugging:

The real issue is the device not booting back to normal run mode. Are you adding :leave after the address like this?

-s 0x0800c000:leave

(I give that address because that places the app after the mcuboot bootloader — if you’ve already programmed over the bootloader, or are using a unified binary, then use the base of flash 0x08000000.)

Actually, I notice in your screenshot “Built target dfu_flash” — so I suspect you’re running make dfu_flash, which is defined here:

This does correctly use :leave.

  1. Could you please share the output of dfu-util -l while the device is connected in DFU mode.
  2. Are you setting USE_BOOTLOADER=1? You can look at the CMakeCache.txt file in your cmake build directory to see which values are set.

Looking through the CMakeCache.txt file i do not see USE_BOOTLOADER=1 defined. How would I go about passing that flag?

Sorry brain fart, -DUSE_BOOTLOADER=1

Is that value cached though in CMakeCache.txt if I didnt set it via cmd line originally?

1 Like

Yes, that’s correct. If it’s not set, and then you run cmake ../.. -DUSE_BOOTLOADER=1 (or similar, depending on your setup) you can then look at the CMakeCache.txt file again and should see the entry now. You can also modify entries in that file.

After adding USE_BOOTLOADER=1 you’ll probably have to flash the bootloader again, since it may have been overwritten. Make a different cmake build directory for it, per the instructions in ENV_SETUP.md in the repo.

Try running make dfu_flash for both the bootloader app and for your custom app. :crossed_fingers: Hope it works normally at that point! If not, let us know.

Reflashing the bootloader solved it. Thanks!

1 Like