Portenta H7 flash split

How do enable flash split like the way that i can do in the arduino ide?
I want too use a 100/0 split meaning that i want all flash to be allocated towards the m7 core and the m4 only uses the sdram.

Because i can’t get the example “BootM4_from_SDRAM” from arduino working using platformio.

is there an option too enable this type of flash split?

Looking a t the baord definitions

so the first instinct would be to add

board_build.arduino.flash_layout = 100_0

to the platformio.ini.

Internally, this is handled in the builder script

to handle it exactly like the Arduino IDE would

i have done this but it still reports the following,
RAM: [== ] 16.7% (used 87432 bytes from 523624 bytes)
Flash: [===== ] 52.1% (used 409888 bytes from 786432 bytes)
Or does this indicator not update with the change too flash_layout

I think it’s an oversight that upload.maximum_size and upload.maximum_ram_size are not updated with the flash layout split, thus the indicated numbers will be wrong, but the firmware will still be built, linked and uploaded correctly.

You can e.g. check if the effect of

    elif flash_layout == "100_0":
        defines.append(("CM4_BINARY_START", "0x60000000"))

has taken place doing a Project Task → Clean and then Project Task → Advanced → Verbose Build.

Along the wall of compiler invocations, capture one, and it should have -DCM4_BINARY_START=0x60000000 in it hopefully. If not, it didn’t work.

is indeed set, and the code does compile and work.

1 Like