How to change the ram size in platform?

i know the platform support the board [nucleo_l476rg],
but in my project, i used STM32L476RET6 that ram is less to 80KB , or i used STM32L476VG that pins are up to LQFP100.
which files i should to modified to adapt to the two chips?
thank you

Looking at the provided board list (PlatformIO Registry)

So just use board = nucleo_l476rg and disco_l476vg.

That should work for the 476VG, but what about the 476RE (the other model mentioned by the OP), which has half the flash of the 476RG? I don’t suppose it’s as simple as just overriding the upload.maximum_size (if indeed that parameter can be overridden via the platformio.ini)… or is it?

yeap, that’s my question,
how to use the chips similar to the platform supported?
where should i change the ram size or pin count or something else?

Well if you have a new microcontroller then the firamework has to primarily support it. Which frameworks do you want to work with with the STM32L476RET6? (the STM32L476VG is already supported with mbedos, STM32Cube and Zephyr as you could see above)

ok STM32L476RG can use in platform io ide under Arduino frame, but I want to use STM32L476RG,
where should i to change to use as L476RG like ram size,flash size and so on.
because L476RE is not in the support list, but they are very similar

If you want to to use the STM32L476RG just make sure you put board = nucleo_l476rg in the platformio.ini. The microcontroller data is automatically fetched from its JSON file then.

You can also have multiple environments to compile for both microcontrollers, see “platformio.ini” (Project Configuration File) — PlatformIO latest documentation

thank you for your help
my mistake i mean if I want to use STM32L476VE which is different from the L476RG, less ram size and more peripheral and gpio, but STM32L476VE are not supported by platform IO or official by ST, there is no nucleo series use this chip.
but i use it in my personal project, i want to program it under platform in Arduino, so what should i do, and i can use it under platform io ide. change the ram size or change the pin count?
I am a developer from China , so i do not good at English, sorry.
thank you again for your reply.

thank you for your help

Well first of all as you can e.g. see from https://github.com/stm32duino/Arduino_Tools/tree/master/src/genpinmap/Arduino/STM32L4 the chips STM32L476V(C-E-G)Tx all share the same peripherals, so since the STM32L476VG (via Discovery L476VG) target exists you can base your work for the STM32L476VE off of it.

However as linked above this board supports mbed, Zephyr and STM32Cube as frameworks, but not Arduino. So by default you also wouldn’t be able to use this board with the Arduino IDE.

However, the STM32Duino core has a good guide on adding a new variant to get the board supported. From the PlatformIO side, you just need a new board JSON file for it. I’d start from the VG file and change mcu, maximum_ram_size (RAM), maximum_size (flash) and add variant under build for the new STM32Duino variant folder name.

1 Like

thank you i get it , happy ending

1 Like