I'm writing code for a USB bootloader. When I compiled the code, I got 2 of the following error:
Invalid Initializer
The error referred to the following lines of code:
static volatile usb_internal_sram_t sr;
static volatile usb_internal_sram_t usb_sram = &sr;
usb_control_t ctr;
static usb_control_t usb_ctrl = &ctr;
Before someone suggests malloc(), this is an embedded system. Dynamic memory allocation is not advised as it can slow down the system. Hence, that is why I attempted to initialize the struct pointers this way. I thought this method would be ok, but apparently not. Anyone have any ideas? Thank you in advance!