Flasing PX4 to kakute H7 mini - no signs of life

Hi!
We have got a Kakute H7 mini V1.3 board, and I have been trying to flash PX4 to it with no success.

Initially i was following this. Flashed the bootloader. But the board is now not detected as a usb device as i plug it into my laptop. And no signs of life apart from a green LED solid on.

flashing log
./dfu-util -a 0 --dfuse-address 0x08000000:force:mass-erase:leave -D "S:\Distrib\Devices\drones\flight controller\holybro_kakuteh7mini_bootloader.hex"

dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash   "
Performing mass erase, this can take a moment
Downloading element to address = 0x08000000, size = 117829
Erase           [=========================] 100%       117829 bytes
Erase    done.
Download        [=========================] 100%       117829 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state

Then built holybro_kakuteh7mini_bootloader from px4 main branch, and flashed it, same.

Then built holybro_kakuteh7mini_default, flashed holybro_kakuteh7mini_default.bin with the same dfu command. Same result.
I have probed T3 pin with an oscilloscope to see if there is any activity on the system console serial port. There is nothing, the pin is always low and seems to be in input mode. I have also checked T2, T4, T6 just in case, nothing.

I have also tried flashing holybro_kakuteh7mini_bootloader.hex for mini v1.3 from holybro (Supported Firmware | Holybro Docs), both for v1.3, and for v1.5 board just in case, same - nothing.

I have also tried https://github.com/PX4/PX4-Autopilot/raw/1ddacec36be187117e040a29df9640337159be2b/boards/holybro/kakuteh7mini/extras/holybro_kakuteh7mini_bootloader.bin . Same.

And i have then flashed back betaflight with betaflight configurator, and betaflight runs and i can connect to it.

I’m all out of ideas on what i’m doing wrong here.

small update. We’ve built a blinky test program (that toggles PC2 pin), flashed it with the same method, and it blinks the blue LED. So the flashing command is definitely working.

Found a solution.

I’ve changed bootloader build config:
boards/holybro/kakuteh7mini/bootloader.px4board
add these two lines:

CONFIG_BOARD_ROOT_PATH=""
CONFIG_BOARD_PARAM_FILE=""

(i have actually used make holybro_kakuteh7mini_bootloader boardconfig to make this edit)

Then built and flashed the bootloader, and the bootloader is working. Then built PX4 and flashed the .px4 file with qgroundcontrol. Now i have a working PX4, BINGO!

Thanks for that. Could you create a PR to update main branch?

Sure (a bit later). Building the bootloader seems to have updated a binary in the repo, shall i also commit the binary?

BTW, i’m still very confused, why my board wasn’t working. Can it really be that two pre-built bootloaders i got from different places were really actually non-functional? It seems people are flashing kakutes without issues…

Also. The reason i’ve tried these edits was because i had a hypothesis that px4/bootloader is crashing early in the boot process while trying to log the boot process to an incorrectly formatted blackbox flash chip. That all seemed very plausible until i’ve found out my now-working PX4 can’t write to it, presumably because PX4 does not support non-sd blackbox at all. Now it doesn’t make sense again. Or does PX4 already support the onboard flash (would be awesome!), and i’m actually having formatting error? if so, why does it start up now? if not, why was i having the problem in the first place, and why did my fix work?..

I have no idea - my thinking was that you had a problem and you found a solution, so we should share that with everyone else.

@rroche Might have some suggestions.

I have no problem to flash the px4 bootloader with my kakute h7 mini v1.3.

I can do it with both dfu-util commands or STM32CubeProgrammer app.