Bluepill (STM32F103) + NeoPixel version of the Simon game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
stm32f103-simon/README.md

21 lines
1.3 KiB

8 years ago
# STM32F103 CLion CubeMX boilerplate
8 years ago
8 years ago
## Basics
8 years ago
8 years ago
- This is a CMake / CLion project, using `arm-none-eabi-gcc` and `arm-none-eabi-newlib`.
- It's built on Linux. Whether it works on Windows or MacOS is left as an exercise to the reader :stuck_out_tongue:
- Update the init files using **STM32CubeMX** to fit your project needs. Open `bluepill.ioc` in CubeMX, then export
to the same folder.
- Since we're using CubeMX, this project is based on HAL. It's not so bad, if you don't look at the source too much.
8 years ago
8 years ago
## Getting Started - Usage
8 years ago
- The default setup is USART1, 115200 baud, at PA9 (Tx), PA10 (Rx); PC13 as output (built-in LED).
- The program branches from `main.c` into `User/user_main.c` where the actual application code starts.
8 years ago
- Initialization of the application code (libs) is done in `User/init.c`. Exception handlers and such are handled in
`User/handlers.c`.
8 years ago
- Use the included Debounce module for button inputs, Timebase for periodic and future tasks.
- Functions from `User/utils/debug.h` print messages to USART1, and work like `printf()`. Regular `printf()` works as well.
- Use `malloc_s()` and `calloc_s()` if you want error message on malloc fail instead of a hard fault / memory corruption.
- Flash using `./flash.sh`. Hold the reset button on the board, and release it right after issuing the flash command.