STM32 Bootloader Design – Part 3
Here is the bootloader code, let's go through it and explain it step by step: /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "flash.h" #include "srecord.h" #define USER_APPLICATION_BASE_ADDRESS 0x8004000U uint8_t srec_data[16]; void __svc(1) EnablePrivilegedMode(void ); void __SVC_1 (void){ __disable_irq(); __set_CONTROL((__get_CONTROL( ))& 0xFFFFFFFE); // enter priv mode __enable_irq(); } static void BootJump(uint32_t *Address) { /* 1. Make sure,