Vanilla Firmware Build fails to work after flash

We are doing our best to solve the power on/off issue by building a new firmware. So our first approach was just to use the vanila GitHub - balena-io-hardware/balena-fin-coprocessor-firmata: firmata firmware for the BGM111 co-processor on the balenaFin and build a hex without any changes. All went smooth (not sure if the log has any issue. firmware.log (25.6 KB) )

After that, we used the GitHub - balena-io-hardware/balena-fin-firmata-flash: BalenaFin application to flash the on-board co-processor with the latest version of balenaFin Firmata . It did work very well for the:
curl -X POST localhost:1337/v1/flash/firmata-balena-2.0.1.hex
The basic functions are there and they work: sleep, setpin, etc.

But when using our new firmware (suppose to have the same implementation) it does not work well. Any command will just make reboot the hardware and loose their state.

Can someone help us? Please? We can try to make a call or chat if required to close all our topics at once.

Thank you