And the .bin does not only contain the Flash contents but also what's supposed to go into the FPAG bitstream memory, which is apparently right behind flash.
Uploading in PlatformIO fails with a bossac error: "file operation exceeds flash size".
By comparing the working Arduino-IDE bossac invocation of
We can see that a difference is a missing -I flag in PlatformIO, to which bossac says
-I, --ignoreOverflow ignore if binary is bigger than internal flash
may be used to program external flash with contiguous address space)
So it may be that for that chip the FPGA mem sits right behind flash and thus the Arduino IDE builds a .bin file that has Flash + fill for aligment (?)+ FPGA bitstream and then uses -I for this board (or all boards on Atmel SAM?) to make bossac flash the binary image to the chip into memory that actually exists after all.
Currently, this can be worked around in the platformio.ini with upload_flags = -I but a bugfix or investigation here would be good.
See https://community.platformio.org/t/mkr-vidor-4000-with-vidorperipherals-upload-fails/18922/.
When the
platformio.ini
is used with the code
the resulting ELF binary has the sections
And the
.bin
does not only contain the Flash contents but also what's supposed to go into the FPAG bitstream memory, which is apparently right behind flash.Uploading in PlatformIO fails with a bossac error: "file operation exceeds flash size".
By comparing the working Arduino-IDE bossac invocation of
with the non-working PlatformIO invocation
We can see that a difference is a missing
-I
flag in PlatformIO, to which bossac saysSo it may be that for that chip the FPGA mem sits right behind flash and thus the Arduino IDE builds a
.bin
file that has Flash + fill for aligment (?)+ FPGA bitstream and then uses-I
for this board (or all boards on Atmel SAM?) to make bossac flash the binary image to the chip into memory that actually exists after all.Currently, this can be worked around in the
platformio.ini
withupload_flags = -I
but a bugfix or investigation here would be good.