feat: basic H7 support (#5228)
Co-authored-by: Malte Langermann <malte@langermann.net> Co-authored-by: 3djc <3djc@gh.com> Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: Richard Li <richard.li@ces.hk>
This commit is contained in:
co-authored by
Malte Langermann
3djc
raphaelcoeffic
Richard Li
parent
2110f1b938
commit
6f8a5313d5
@@ -19,8 +19,11 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#if !defined(SIMU)
|
||||
#include "stm32_hal_ll.h"
|
||||
#include "stm32_timer.h"
|
||||
#endif
|
||||
|
||||
#include "hal/usb_driver.h"
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
@@ -178,10 +181,9 @@ int menuFlashFile(uint32_t index, event_t event)
|
||||
void flashWriteBlock()
|
||||
{
|
||||
uint32_t blockOffset = 0;
|
||||
while (BlockCount) {
|
||||
#if !defined(SIMU)
|
||||
while (BlockCount) {
|
||||
flashWrite((uint32_t *)firmwareAddress, (uint32_t *)&Block_buffer[blockOffset]);
|
||||
#endif
|
||||
blockOffset += FLASH_PAGESIZE;
|
||||
firmwareAddress += FLASH_PAGESIZE;
|
||||
if (BlockCount > FLASH_PAGESIZE) {
|
||||
@@ -191,6 +193,7 @@ void flashWriteBlock()
|
||||
BlockCount = 0;
|
||||
}
|
||||
}
|
||||
#endif // SIMU
|
||||
}
|
||||
|
||||
#if defined(EEPROM)
|
||||
@@ -225,7 +228,7 @@ void bootloaderInitApp()
|
||||
// wait a bit for the inputs to stabilize...
|
||||
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
|
||||
for (uint32_t i = 0; i < 150000; i++) {
|
||||
__ASM volatile ("nop");
|
||||
__ASM volatile("nop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,6 +593,3 @@ int bootloaderMain()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(SIMU) && (defined(PCBHORUS) || defined(PCBFLYSKY))
|
||||
void *__dso_handle = nullptr;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user