Question
External SPI flash loader warning while generating code
Hi everyone,
I made a custom external flash loader following the examples provided with CubeProgrammer.
The generated elf is working perfectly as I want, I can read, write and erase the NOR chip.
But the device information structure below
struct StorageInfo const StorageInfo = {
"W25Q16JV_MyBoard", // Device Name
NOR_FLASH, // Device Type
0x90000000, // Device Start Address
0x200000, // Device Size in Bytes (2 MBytes)
0x100, // Programming Page Size 256 Bytes
0xFF, // Initial Content of Erased Memory
// Specify Size and Address of Sectors (view example below)
0x00000200, 0x00001000, // Sector Num: 512, Sector Size: 4 KBytes
0x00000000, 0x00000000,
};keeps generating the following warning (using GNU gcc with TrueStudio 9.3):
..\src\Dev_Inf.c:5:40: warning: missing braces around initializer [-Wmissing-braces]
struct StorageInfo const StorageInfo = {
^
..\src\Dev_Inf.c:5:40: note: (near initialization for 'StorageInfo')Does anyone understands why gcc is not happy here ?
Best regards,
Kraal
