Download and install STM32 Cube IDE. Make new project:
Choose a microcontroller, we are using STM32F103C8T6
Select one and click next, then give a name to your project and click finish.
STM32 Cube IDE now generated a lot of files for us. Most of those we aren't going to use so delete all except these files below. CMSIS are a bunch of header files that we need, inside of those header files are names of all registers, bit names and positions.
Last thing we will do is that the project by default has defined "USE_HAL_DRIVER" in preprocessor symbols. We will remove that so that compiler doesn't search for HAL files. Open properties.
Follow the instructions below. And click delete on USE_HAL_DRIVER
And we are now done with setting up our project. We can start coding.
Copyright 2024, Mario Matovina
Send me an e-mail