Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stm32l152c-discovery board #70765

Merged
merged 2 commits into from Apr 22, 2024

Conversation

maxinbjohn
Copy link
Contributor

Add support for STM32L152C-DISCOVERY board. It is similar to STM32L1-DISCOVERY board with more memory ( 256K flash, 32K RAM, 8K EEPROM )

Tested using samples/philosophers/

The STM32L152C-DISCOVERY is a development board based on the STM32L152RC
MCU. It is very similar to the stm32l1_disco, which was used as a
reference for the pinmux and defconfig.

stm32l152c_disco board has 256 Kbytes of flash memory, 32 Kbytes of RAM
and 8 Kbytes of data EEPROM.

Signed-off-by: Maxin John <maxin.john@gmail.com>
Updated the documentation with details of stm32l152c-discovery board.

Signed-off-by: Maxin John <maxin.john@gmail.com>
@maxinbjohn
Copy link
Contributor Author

I will add a bit more context here. Some of the zephyr applications which require more memory, will not even compile for stm32l1-disco. It is a bit inconvenient since the stm32l152c-discovery board has enough RAM to build and run these programs.

eg:

  1. $ west build -p auto -b stm32l1_disco zephyr/samples/philosophers --pristine
    ...
    /ssd/work/zephyr-sdk-0.16.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section noinit' will not fit in region RAM'
    /ssd/work/zephyr-sdk-0.16.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 1184 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

  2. $ west build -p auto -b stm32l1_disco zephyr/samples/subsys/display/cfb_shell --pristine
    /ssd/work/zephyr-sdk-0.16.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section noinit' will not fit in region RAM'
    /ssd/work/zephyr-sdk-0.16.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 9680 bytes
    collect2: error: ld returned 1 exit status

Comment on lines +1 to +9
boards:
- name: stm32l1_disco
vendor: st
socs:
- name: stm32l151xb
- name: stm32l152c_disco
vendor: st
socs:
- name: stm32l152xc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tejlmand What is your advice on this ? Should we rather split in 2 different boards, instantiate revisions, keep current proposal of exposing 2 variants of the board reference in this same folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @erwango and @tejlmand ,

This change follows how mimxrt1060_evk (boards/nxp/mimxrt1060_evk) handles two variants in the same folder. However, if we decide to choose another way, it is fine from my side.

@carlescufi carlescufi merged commit 5d36473 into zephyrproject-rtos:main Apr 22, 2024
21 checks passed
@maxinbjohn maxinbjohn deleted the stm32l152c_disco branch April 22, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants