Hi, I have a bluepill with a F103C8 uC that has 128K of usable flash (64K Reported), the upload and verify works fine with the following platformio.ini:
platform = ststm32@^14.0.0
board = bluepill_f103c8_128k
framework = arduino
upload_protocol = stlink
upload_flags = -c set FLASH_SIZE 0x20000
debug_tool = stlink
I also tested it by printing through the serial monitor more than 64K of flash text.
My problem is when uploading in Debug Mode, I managed to make it compile to 128K with the following line: “board_upload.maximum_size = 131072”, but when uploading it autodetects the Flash size as 64K: “Info : flash size = 64kbytes”, to make it upload I had to modify the file “.platformio/packages/tool-openocd/scripts/target/stm32f1x.cfg” by changing the autodetect flash size to the value required:
# autodetect size it was 0
set _FLASH_SIZE 0x20000
My question is, is there any way to set this _FLASH_SIZE to the desired value, similar to the command “upload_flags = -c set FLASH_SIZE 0x20000” but for the Debug upload_flags?
Thanks, let me know if you need anything else.