diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 91d65235ef..488988d430 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c @@ -619,7 +619,7 @@ static int sd_select_bank(signed char bank) #define UNALIGNED_NUM_SECTORS 10 static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SECTOR_SIZE] __attribute__((aligned(32))); /* align on cache line size */ -static unsigned char *uncached_buffer = UNCACHED_ADDR(aligned_buffer); +static unsigned char *uncached_buffer = UNCACHED_ADDR(&aligned_buffer[0]); static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf, const bool write) diff --git a/firmware/target/arm/as3525/system-target.h b/firmware/target/arm/as3525/system-target.h index daea180a64..eb59709cd3 100644 --- a/firmware/target/arm/as3525/system-target.h +++ b/firmware/target/arm/as3525/system-target.h @@ -28,7 +28,7 @@ #ifdef BOOTLOADER #define UNCACHED_ADDR(a) (a) #else -#define UNCACHED_ADDR(a) (a + 0x10000000) +#define UNCACHED_ADDR(a) ((typeof(a)) ((uintptr_t)(a) + 0x10000000)) #endif #endif /* SYSTEM_TARGET_H */