I’m trying to use an external flash chip as a FAT storage, to expose through USB CSC
Adafruit SPIFlash for the RP2040 requires you to set the flash size “through the Arduino IDE Tools->Flash menu”
I’ve found the entries in the boards.txt, e.g.
challenger_2040_wifi_ble.menu.flash.16777216_15728640.upload.maximum_size=1044480
challenger_2040_wifi_ble.menu.flash.16777216_15728640.build.flash_total=16777216
challenger_2040_wifi_ble.menu.flash.16777216_15728640.build.flash_length=1044480
challenger_2040_wifi_ble.menu.flash.16777216_15728640.build.eeprom_start=285208576
challenger_2040_wifi_ble.menu.flash.16777216_15728640.build.fs_start=269479936
challenger_2040_wifi_ble.menu.flash.16777216_15728640.build.fs_end=285208576
But what do I do with these?
the pico
board json doesnt mention flash size/FS size at all.
Doing board_
overrides in platformio.ini using the names from boards.txt has no effect.
I can see this block inside Adafruit_FlashTransport_RP2040.cpp
// symbol from linker that matches 'Tools->Flash Size' menu selection for
// filesystem
extern uint8_t _FS_start;
extern uint8_t _FS_end;
Am I supposed to overwrite/define these in code?
What values do I give them, they are uint8_t
s, and the code does this:
// FS Size determined by menu selection
#define MENU_FS_SIZE ((uint32_t)(&_FS_end - &_FS_start))
i.e gets the address of the variables, as though they already exist in ram, but at the flash locations… How do I set this in CPP (if necessary)?
Any other tips on my objective greatly received.
Thanks
Andrew