I recently purchased a STM32F4 board to learn the ARM architecture. I am fairly comfortable with embedded programming having worked with AVR series for about a year.
I was going through this tutorial at here
In this the author has mentioned that usually in the ARM boards world, you have 2 set of libraries:
- Cortex M Software Interface Standard (CMSIS) - general HAL layer/interface for Cortex M specific features
- STM32 libraries - specifically for the onboard peripherals on the STM development board (I2C, SPI, CAN etc)
The author also mentions that just like any HAL layer, the purpose of these is for one to quickly develop rather than waste time on setting things up.
Coming from AVR side where I am using minimal/no libraries and setting up everything by hand (for example spi configuration, rx and tx interrupt driven functions etc) I find this bit strange. By using the STM specific libraries, wouldn't one be constricted to using their microcontrollers only? Then in future if I use some other vendors chip, I'll have to learn to use their specific library
I would like to get an opinion that if this is the right way to go. Being new to ARM should I just use these libraries for now till I become more comfortable or should I from the start get into the habit of doing everything myself?
The idea is to lean ARM independently of any vendor specific board or microcontroller.