flash sharing of bootloader and app

I open up a flash shared space in app and bootloader, write values from app, bootloader read, bootloader read values such as 0xFFFFF, and not ideal values, may I ask why this is.

Based on the background of this problem, I want to customize the protocol OTA without any verification. I have correctly transferred the firmware data to bank1 through flash, and I want to modify s_dfu_setting myself to make the bootloader know that the firmware is valid and can be updated.

Parents
  • Hello, thank you very much for your time. Now I can successfully write firmware data to bank_1 area through the app, and I can also successfully pass the verification of setting after entering the bootloader. I have successfully made the bootloader recognize the firmware data written by me as valid. However, the problem is that the process of copying firmware data from bank_1 to bank_0 in the bootloader is restarting. The following is the run log. The log for the first image shows that the watchdog turned on when entering image_copy is not turned on. I wonder if that's what caused the reboot?

  • Hello,

    The bootloader will feed the watchdog if it sees that it is enabled by the application prior to entering dfu mode, but it will not enable it. Can you please a breakpoint in the bootloader's error handler to see if the error may have been triggered by a runtime error?

  • Hello, I tried extending the watchdog timer in the app, but it didn't solve the problem. I tried setting breakpoints in Keil, but when the debugger jumped to the bootloader, it disconnected. I wonder if there's something wrong with my debugging method. I would like to ask how to set breakpoints for debugging in the bootloader, or if there are any tools or related documentation.

  • You can debug the bootloader the same way you debug your application. The difference is that you need to open the bootloader project in Keil instead. The application project does not include the debug symbols needed to debug the bootlaoder.

Reply Children
Related