There are 2 types of CMSIS files. The first type are about the core, like Cortex-M4 or Cortex-M3 and includes definitions for the peripherals that can be found on all Cortex-M4's regardless of the manufacturer. There header files can be found here:
https://github.com/micropython/micropyt ... /cmsis/inc
These header files contain the definitions for the SCB and NVIC.
The second type of CMSIS files are sepcific to an MCU and describe the peripherals included on the that MCU. These header files can be found here:
https://github.com/micropython/stm32lib ... xx/Include
These include definitions for GPIO, RTC, DMA, I2C, SPI, etc.
The stm32 port uses the HAL files. The name of the HAL header file is defined by the macro STM32_HAL_H in the Makefile:
https://github.com/micropython/micropyt ... kefile#L82
The chain of include files to get to core_cm4.h when building for PYBV11 looks something like this:
stm32lib/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h (this it the STM32_HAL_H #define)
ports/stm32/boards/PYBV11/stm32f4xx_hal_conf.h
stm32lib/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_xxx.h (replace xxx with can/rcc/i2c/gpio/etc)
stm32lib/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h
lib/stm32lib/CMSIS/STM32F4xx/Include/stm32f4xx.h
lib/stm32lib/CMSIS/STM32F4xx/Include/stm32f405xx.h
lib/cmsis/inc/core_cm4.h
One simple way to determine this is to run a command something like the following:
Code: Select all
make BOARD=PYBV11 build-PYBV11/uart.pp
You can then look at the build-PYBV11/uart.pp file which will be the uart.c file with all of the #includes fully expanded.