Firmware issue replacing MCU KakuteF7

Hi,

I started with Flight Controller KakuteF7 but needed EKF2 module to fly position and offboard modes. I tried to make space to fit the code in flash by modifying default.cmake file as stated here : https://github.com/PX4/PX4-Autopilot/issues/16209.
However, some modules are mandoatory for my use case so I decided to replace the MCU of the KakuteF7 (a STM32F745VG) with a STM32F765VI pin to pin compatible but with 2Mb of flash instead of 1MB.

I am encountering a problem with the firmware : using QGC flashing firmware from stable release (V1.11.3) is OK and the board seems to work well. When I compile firmware locally, without modifying any file (just running “make holybro_kakutef7_default upload”) the firmware is uploaded to the board but crashes after few seconds, USB is no more detected (device manager display : unknown USB device).

Has someone encounter a similar problem ? And has someone ever replace a MCU from a FC ?

Thank you for your help.

My guess would be to look into Nuttx configuration. You need to let it know that now it runs on a MCU with extended memory.

Btw: I’m running vanilla kakute f7 with EKF2 on 1 MB flash.

Hi @j_p, thank you for your answer.

You’re right few modifications have to be done into Nuttx configuration (nuttx-config/scripts/script.ld file).

On my side I found it difficult to fit code in flash by adding EKF2 and keeping all basic modules (att_control, pos_control, rate_control…).

Finally found a solution to my issue by compiling firmware from v1.11.3 release branch. It seems that master branch has been too much modified since last stable release in order to “accept” new MCU.