0
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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

\$\endgroup\$
  • \$\begingroup\$ 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? \$\endgroup\$ – scico111 Feb 12 at 10:15
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Justme Feb 12 at 18:33
  • 2
    \$\begingroup\$ @Justme -- the CMSIS Core is largely an API, and contains plenty of functions. \$\endgroup\$ – Scott Seidman Feb 12 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.