Workaround for arm-none-eabi-gcc 12.3.

This commit is contained in:
Dual Tachyon 2023-09-01 19:40:10 +01:00
parent 0e274ab0bf
commit 1398332c7f

View File

@ -20,6 +20,7 @@
#include "bsp/dp32g030/syscon.h"
#include "sram-overlay.h"
static volatile uint32_t *pFlash = 0;
uint32_t overlay_FLASH_MainClock;
uint32_t overlay_FLASH_ClockMultiplier;
uint32_t overlay_0x20000478; // Nothing is using this???
@ -87,7 +88,8 @@ void overlay_FLASH_Unlock(void)
uint32_t overlay_FLASH_ReadByAHB(uint32_t Offset)
{
return *(volatile uint32_t *)(Offset & ~3U);
return pFlash[(Offset & ~3U) / 4];
}
uint32_t overlay_FLASH_ReadByAPB(uint32_t Offset)