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.