Skip to content

Latest commit

 

History

History
106 lines (82 loc) · 2.83 KB

README.md

File metadata and controls

106 lines (82 loc) · 2.83 KB

Blinky Demo For STM32 (Alire)

STM32F429disco

STM32F746disco

Prerequisite

Fetch the Crate

alr get stm32_blinky_demo
cd stm32_blinky_demo*

Configure Board

Edit the alire.toml file by uncommenting the board for which you build: (eg. STM32F429disco)

...
[[depends-on]]
stm32f429disco = "0.1.0"
#stm32f746disco = "0.1.0"
...

Pin Working Cross Compiler (IMPORTANT)

alr pin gnat_arm_elf=12.2.1

Build (Alire)

alr build

Build (GPRBuild)

eval "$(alr printenv)"
gprbuild stm32_blinky_demo.gpr

Build (GnatStudio)

eval "$(alr printenv)"
gnatstudio stm32_blinky_demo.gpr

Program to Board

  • Linux, MacOS:
openocd -f /usr/share/openocd/scripts/board/stm32f429disc1.cfg -c 'program bin/stm32_blinky_demo verify reset exit'
  • Windows:
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c 'program bin/stm32_blinky_demo verify reset exit'

Running on Renode

First make sure you have Renode (>= 1.15.2) binaries visible on your PATH.

Launch the Renode console (at the root of this repo):

renode --console

Then at Renode prompt:

 include @renode/stm32f429_startup.resc

It will launch the Renode script stm32f429_startup.resc. You should see alternating logging of sort:

...
... [NOISY] stm32f429_custom/gpioPortG.UserLED: LED state changed to False
... [NOISY] stm32f429_custom/gpioPortG.UserLED: LED state changed to True
...

To terminate:

quit

Contributing

Your contributions are welcome! If you wish to improve or extend the capabilities of this BSP, please feel free to fork the repository, make your changes, and submit a pull request.

Support and Community

If you encounter any issues or have questions regarding the usage of this crate, please file an issue on the GitHub repository. For broader discussions or to seek assistance, join an Ada developer community found here.


Happy Coding with Ada!