Re: This HID bootloader does not load the Arduino sketch, why
Posted: Thu Jul 08, 2021 6:57 pm
So what's the address, according to the source it's at 0x08000000
FLASH_BASE start at 0x08000000, we add the bootloader there so it takes FLASH_BASE + BOOTLOADER_SIZE, then we add the Arduino sketch aka USER_PROGRAM after that.
This configuration is perfectly working and makes the board recognizable by Windows when I only let the bootloader in the device memory, but when I add the USER_PROGRAM, the board start to be unrecognizable.
Code: Select all
#define FLASH_BASE ((uint32_t)0x08000000) /*!< FLASH base address in the alias region */
#define BOOTLOADER_SIZE (2 * 1024) // Bootloader size
#define USER_PROGRAM (FLASH_BASE + BOOTLOADER_SIZE) // HID Bootloader takes 2 kb flash
funct_ptr UserProgram = (funct_ptr)*(volatile uint32_t*)(USER_PROGRAM);
This configuration is perfectly working and makes the board recognizable by Windows when I only let the bootloader in the device memory, but when I add the USER_PROGRAM, the board start to be unrecognizable.