0

If I generate code using STM32CubeMX then which files are related to CMSIS and which files are related to HAL? My toolchain is Atollic TrueSTUDIO.

scico111
  • 857
  • 16
  • 39

1 Answers1

2

CMSIS files are in their own folder, and HAL files are in their own folder. Regardless of which toolchain is selected.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • Is it safe to use functions from HAL files as well as CMSIS files and mix them in the application code while the project is generated by CubeMX? – scico111 Feb 12 '19 at 10:15
  • 1
    They are completely separate things. HAL files are peripheral drivers, or just code libraries for using peripherals, CMSIS does not have code you can call. CMSIS more like headers for defining peripheral register addresses and bit masks to human readable names, which the HAL code then can use, or you if you want to make your own peripheral drivers. – Justme Feb 12 '19 at 18:33
  • 2
    @Justme -- the CMSIS Core is largely an API, and contains plenty of functions. – Scott Seidman Feb 12 '19 at 18:56