Coding a MCU
The code should include:
- A basic GPIO library to toggle an LED on Pin 13
- Linker File
- Makefile
- Startup file
The project structure is described as follows:
- The 'core' folder contains the 'inc' folder which are in essentially .h files
- The 'src' folder contains all the .c files (specially main.c)
Basic GPIO Library
In order to toggle an GPIO Pin, in ARM Cortex M0 microcontroller we need to:
- Define the memory location of the peripherals registers like RCC and GPIO
- Configure the needed registers
- Set the specifics bits