IntergatedCircuits / DfuBootloader

STM32 USB device bootloader using DFU class interface
Apache License 2.0
93 stars 18 forks source link

hardfault occur M0(+) Core #6

Closed aroerina closed 4 years ago

aroerina commented 4 years ago

usbd_dfu.c 784: and 792: itf->Address = (uint8_t)((__packed uint32_t *)data);

This code is unaligned access; in the MCU with an M0(+) core, it is Fires a hardfault.

benedekkupper commented 4 years ago

Thanks for reporting this, can you check with the latest master again?

aroerina commented 4 years ago

Thanks for fixing the code. I compiled it and tried it on an STM32F072CB and DfuSe. It worked perfectly.