Decrease flash usage by disabling some peripherals? #2296
-
Hi, everyone. I encountered flash memory overflow with some "large" codes on STM32F103C6. This project uses UARTs only (no I2C, SPI, etc.). Would it be able to disable some unused peripherals? I saw every peripheral HAL library was compiled and linked into the final elf/bin file. Even an empty program (only setup and loop function) takes up quite a bit of the flash memory. |
Beta Was this translation helpful? Give feedback.
Answered by
fpistm
Mar 6, 2024
Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
fpistm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @China-Mr-Hou
You can refer to:
https://github.com/stm32duino/Arduino_Core_STM32/wiki/HAL-configuration#example-of-blinkino-for-nucleo-l031k6-with-32768-bytes-of-flash-and-8192-bytes-of-ram
And also:
https://github.com/stm32duino/Arduino_Core_STM32/wiki/Custom-definitions#custom-pinmap-array