first commit

This commit is contained in:
fewikay committed 2026-10-16 13:08:06 +02:00
commit 92cbe97616
1978 files changed
+1688498

No files matched your search

@@ -0,0 +1 @@
Checks: " -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling "
+3
View File
@@ -0,0 +1,3 @@
build
Debug
Release
+119
View File
@@ -0,0 +1,119 @@
[CortexM7:PreviousLibFiles]
LibFiles=Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_bus.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_crs.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_system.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_utils.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dma_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_dma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_dmamux.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_mdma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_pwr.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_pwr_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_pwr.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_def.h;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_i2c.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_i2c_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_exti.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_exti.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_spi.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_spi.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_spi_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_tim.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_tim_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_tim.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_uart.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_usart.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_lpuart.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_uart_ex.h;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtqueue.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\cortexm\sys.c;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_bus.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_crs.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_system.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xLine truncated
[CortexM7:PreviousUsedCubeIDEFiles]
SourceFiles=CM7\Core\Src\main.c;CM7\OPENAMP\mbox_hsem.c;CM7\OPENAMP\openamp.c;CM7\OPENAMP\rsc_table.c;CM7\Core\Src\stm32h7xx_it.c;CM7\Core\Src\stm32h7xx_hal_msp.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtqueue.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\cortexm\sys.c;Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;;;
HeaderPath=Middlewares\Third_Party\OpenAMP\open-amp\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include\metal\compiler\gcc;Middlewares\Third_Party\OpenAMP\virtual_driver;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg;Drivers\STM32H7xx_HAL_Driver\Inc;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32H7xx\Include;Drivers\CMSIS\Include;CM7\OPENAMP;CM7\Core\Inc;Middlewares\Third_Party\OpenAMP\open-amp\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include\metal\compiler\gcc;Middlewares\Third_Party\OpenAMP\virtual_driver;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg;Drivers\STM32H7xx_HAL_Driver\Inc;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32H7xx\Include;Drivers\CMSIS\Include;
CDefines=CORE_CM7;USE_HAL_DRIVER;STM32H755xx;USE_HAL_DRIVER;METAL_INTERNAL;METAL_MAX_DEVICE_REGIONS:2;RPMSG_BUFFER_SIZE:512;VIRTIO_MASTER_ONLY;NO_ATOMIC_64_SUPPORT;USE_PWR_DIRECT_SMPS_SUPPLY;USE_PWR_DIRECT_SMPS_SUPPLY;USE_HAL_DRIVER;USE_HAL_DRIVER;
[CortexM4:PreviousLibFiles]
LibFiles=Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_bus.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_crs.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_system.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_utils.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dma_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_dma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_dmamux.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_mdma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_pwr.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_pwr_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_pwr.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_def.h;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_i2c.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_i2c_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_exti.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_exti.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_eth.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_eth_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_tim.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_tim_ex.h;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_eth.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_eth_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtqueue.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\cortexm\sys.c;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_bus.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_crs.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_system.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_utils.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32Line truncated
[CortexM4:PreviousUsedCubeIDEFiles]
SourceFiles=CM4\Core\Src\main.c;CM4\OPENAMP\mbox_hsem.c;CM4\OPENAMP\openamp.c;CM4\OPENAMP\rsc_table.c;CM4\Core\Src\stm32h7xx_it.c;CM4\Core\Src\stm32h7xx_hal_msp.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_eth.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_eth_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtqueue.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\cortexm\sys.c;Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;;;
HeaderPath=Middlewares\Third_Party\OpenAMP\open-amp\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include\metal\compiler\gcc;Middlewares\Third_Party\OpenAMP\virtual_driver;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg;Drivers\STM32H7xx_HAL_Driver\Inc;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32H7xx\Include;Drivers\CMSIS\Include;CM4\OPENAMP;CM4\Core\Inc;Middlewares\Third_Party\OpenAMP\open-amp\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include\metal\compiler\gcc;Middlewares\Third_Party\OpenAMP\virtual_driver;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg;Drivers\STM32H7xx_HAL_Driver\Inc;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32H7xx\Include;Drivers\CMSIS\Include;
CDefines=CORE_CM4;USE_HAL_DRIVER;STM32H755xx;USE_HAL_DRIVER;METAL_INTERNAL;METAL_MAX_DEVICE_REGIONS:2;RPMSG_BUFFER_SIZE:512;VIRTIO_SLAVE_ONLY;NO_ATOMIC_64_SUPPORT;USE_PWR_DIRECT_SMPS_SUPPLY;USE_PWR_DIRECT_SMPS_SUPPLY;USE_HAL_DRIVER;USE_HAL_DRIVER;
[PreviousLibFiles]
LibFiles=Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_bus.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_crs.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_system.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_utils.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_flash_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_gpio_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_gpio.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_hsem.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_dma_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_dma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_dmamux.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_mdma.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_pwr.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_pwr_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_pwr.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_def.h;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_i2c.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_i2c_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_exti.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_exti.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_spi.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_spi.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_spi_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_tim.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_tim_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_tim.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_uart.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_usart.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_lpuart.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_uart_ex.h;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtqueue.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\cortexm\sys.c;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_cortex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_hal_rcc_ex.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_bus.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_rcc.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_crs.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xx_ll_system.h;Drivers\STM32H7xx_HAL_Driver\Inc\stm32h7xLine truncated
[PreviousUsedCubeIDEFiles]
SourceFiles=CM4\Core\Src\main.c;CM7\Core\Src\main.c;CM7\OPENAMP\mbox_hsem.c;CM7\OPENAMP\openamp.c;CM7\OPENAMP\rsc_table.c;CM7\Core\Src\stm32h7xx_it.c;CM7\Core\Src\stm32h7xx_hal_msp.c;CM4\OPENAMP\mbox_hsem.c;CM4\OPENAMP\openamp.c;CM4\OPENAMP\rsc_table.c;CM4\Core\Src\stm32h7xx_it.c;CM4\Core\Src\stm32h7xx_hal_msp.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\virtio\virtqueue.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\cortexm\sys.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_eth.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_eth_ex.c;Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx_dualcore_boot_cm4_cm7.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\CMakeLists.txt;Common\Src\system_stm32h7xx_dualcore_boot_cm4_cm7.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_flash_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_hsem.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_mdma.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_i2c_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_exti.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_spi_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_tim_ex.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c;Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart_ex.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\log.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\condition.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_device.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_init.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_io.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\generic_shmem.c;Middlewares\Third_Party\OpenAMP\libmetal\lib\system\generic\time.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\remoteproc\remoteproc_virtio.c;Middlewares\Third_Party\OpenAMP\open-amp\lib\rpmsg\rpmsg.c;Middlewares\Third_Party\OpenAMP\oLine truncated
HeaderPath=Middlewares\Third_Party\OpenAMP\open-amp\lib\include;Middlewares\Third_Party\OpenAMP\libmetal\lib\include;Middlewares\Third_Party\OpenAMP\virtual_driver;Drivers\STM32H7xx_HAL_Driver\Inc;Drivers\STM32H7xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32H7xx\Include;Drivers\CMSIS\Include;CM7\OPENAMP;CM7\Core\Inc;CM4\OPENAMP;CM4\Core\Inc;
CDefines=CORE_CM4;CORE_CM7;CORE_CM7;USE_HAL_DRIVER;STM32H755xx;USE_HAL_DRIVER;METAL_INTERNAL;METAL_MAX_DEVICE_REGIONS:2;RPMSG_BUFFER_SIZE:512;VIRTIO_MASTER_ONLY;NO_ATOMIC_64_SUPPORT;USE_PWR_DIRECT_SMPS_SUPPLY;USE_PWR_DIRECT_SMPS_SUPPLY;USE_HAL_DRIVER;USE_HAL_DRIVER;CORE_CM4;CORE_CM4;USE_HAL_DRIVER;STM32H755xx;USE_HAL_DRIVER;METAL_INTERNAL;METAL_MAX_DEVICE_REGIONS:2;RPMSG_BUFFER_SIZE:512;VIRTIO_SLAVE_ONLY;NO_ATOMIC_64_SUPPORT;USE_PWR_DIRECT_SMPS_SUPPLY;USE_PWR_DIRECT_SMPS_SUPPLY;USE_HAL_DRIVER;USE_HAL_DRIVER;USE_HAL_DRIVER;
[CortexM7:PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=7
HeaderFiles#0=..\CM7\OPENAMP\openamp_conf.h
HeaderFiles#1=..\CM7\OPENAMP\mbox_hsem.h
HeaderFiles#2=..\CM7\OPENAMP\openamp.h
HeaderFiles#3=..\CM7\OPENAMP\rsc_table.h
HeaderFiles#4=..\CM7\Core\Inc\stm32h7xx_it.h
HeaderFiles#5=..\CM7\Core\Inc\stm32h7xx_hal_conf.h
HeaderFiles#6=..\CM7\Core\Inc\main.h
HeaderFolderListSize=2
HeaderPath#0=..\CM7\OPENAMP
HeaderPath#1=..\CM7\Core\Inc
HeaderFiles=;
SourceFileListSize=6
SourceFiles#0=..\CM7\OPENAMP\mbox_hsem.c
SourceFiles#1=..\CM7\OPENAMP\openamp.c
SourceFiles#2=..\CM7\OPENAMP\rsc_table.c
SourceFiles#3=..\CM7\Core\Src\stm32h7xx_it.c
SourceFiles#4=..\CM7\Core\Src\stm32h7xx_hal_msp.c
SourceFiles#5=..\CM7\Core\Src\main.c
SourceFolderListSize=2
SourcePath#0=..\CM7\OPENAMP
SourcePath#1=..\CM7\Core\Src
SourceFiles=;
[CortexM4:PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=7
HeaderFiles#0=..\CM4\OPENAMP\openamp_conf.h
HeaderFiles#1=..\CM4\OPENAMP\mbox_hsem.h
HeaderFiles#2=..\CM4\OPENAMP\openamp.h
HeaderFiles#3=..\CM4\OPENAMP\rsc_table.h
HeaderFiles#4=..\CM4\Core\Inc\stm32h7xx_it.h
HeaderFiles#5=..\CM4\Core\Inc\stm32h7xx_hal_conf.h
HeaderFiles#6=..\CM4\Core\Inc\main.h
HeaderFolderListSize=2
HeaderPath#0=..\CM4\OPENAMP
HeaderPath#1=..\CM4\Core\Inc
HeaderFiles=;
SourceFileListSize=6
SourceFiles#0=..\CM4\OPENAMP\mbox_hsem.c
SourceFiles#1=..\CM4\OPENAMP\openamp.c
SourceFiles#2=..\CM4\OPENAMP\rsc_table.c
SourceFiles#3=..\CM4\Core\Src\stm32h7xx_it.c
SourceFiles#4=..\CM4\Core\Src\stm32h7xx_hal_msp.c
SourceFiles#5=..\CM4\Core\Src\main.c
SourceFolderListSize=2
SourcePath#0=..\CM4\OPENAMP
SourcePath#1=..\CM4\Core\Src
SourceFiles=;
[PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=14
HeaderFiles#0=..\CM7\OPENAMP\openamp_conf.h
HeaderFiles#1=..\CM7\OPENAMP\mbox_hsem.h
HeaderFiles#2=..\CM7\OPENAMP\openamp.h
HeaderFiles#3=..\CM7\OPENAMP\rsc_table.h
HeaderFiles#4=..\CM7\Core\Inc\stm32h7xx_it.h
HeaderFiles#5=..\CM7\Core\Inc\stm32h7xx_hal_conf.h
HeaderFiles#6=..\CM7\Core\Inc\main.h
HeaderFiles#7=..\CM4\OPENAMP\openamp_conf.h
HeaderFiles#8=..\CM4\OPENAMP\mbox_hsem.h
HeaderFiles#9=..\CM4\OPENAMP\openamp.h
HeaderFiles#10=..\CM4\OPENAMP\rsc_table.h
HeaderFiles#11=..\CM4\Core\Inc\stm32h7xx_it.h
HeaderFiles#12=..\CM4\Core\Inc\stm32h7xx_hal_conf.h
HeaderFiles#13=..\CM4\Core\Inc\main.h
HeaderFolderListSize=4
HeaderPath#0=..\CM7\OPENAMP
HeaderPath#1=..\CM7\Core\Inc
HeaderPath#2=..\CM4\OPENAMP
HeaderPath#3=..\CM4\Core\Inc
HeaderFiles=;
SourceFileListSize=12
SourceFiles#0=..\CM7\OPENAMP\mbox_hsem.c
SourceFiles#1=..\CM7\OPENAMP\openamp.c
SourceFiles#2=..\CM7\OPENAMP\rsc_table.c
SourceFiles#3=..\CM7\Core\Src\stm32h7xx_it.c
SourceFiles#4=..\CM7\Core\Src\stm32h7xx_hal_msp.c
SourceFiles#5=..\CM7\Core\Src\main.c
SourceFiles#6=..\CM4\OPENAMP\mbox_hsem.c
SourceFiles#7=..\CM4\OPENAMP\openamp.c
SourceFiles#8=..\CM4\OPENAMP\rsc_table.c
SourceFiles#9=..\CM4\Core\Src\stm32h7xx_it.c
SourceFiles#10=..\CM4\Core\Src\stm32h7xx_hal_msp.c
SourceFiles#11=..\CM4\Core\Src\main.c
SourceFolderListSize=4
SourcePath#0=..\CM7\OPENAMP
SourcePath#1=..\CM7\Core\Src
SourcePath#2=..\CM4\OPENAMP
SourcePath#3=..\CM4\Core\Src
SourceFiles=;
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>stepper_h7</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCURootProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUMultiCpuProjectNature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,40 @@
{
"configurations": [
{
"name": "STM32H755xx",
"includePath": [
"${workspaceFolder}/CM7/**",
"${workspaceFolder}/Drivers/**",
"${workspaceFolder}/Middlewares/**",
"${workspaceFolder}/../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include",
"${workspaceFolder}/../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1",
"${workspaceFolder}/../libs/LibRTOSConsole/inc",
"${workspaceFolder}/../libs/LibSpindle/inc",
"${workspaceFolder}/../libs/LibL6474/inc"
],
"defines": [
"STM32H755xx",
"STM32H7xx",
"CORE_CM7",
"DEBUG",
"VIRTIO_MASTER_ONLY",
"STM32H755xx",
"STM32H7xx",
"METAL_INTERNAL",
"METAL_MAX_DEVICE_REGIONS=2",
"NO_ATOMIC_64_SUPPORT",
"RPMSG_BUFFER_SIZE=512",
"USE_HAL_DRIVER",
"USE_FLASH_ECC=0",
"USE_MULTI_CORE_SHARED_CODE=0",
"USE_PWR_DIRECT_SMPS_SUPPLY",
"STM32H7"
],
"compilerPath": "arm-none-eabi-gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "gcc-arm"
}
],
"version": 4
}
+159
View File
@@ -0,0 +1,159 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "Build Stepper All",
"cwd": "${workspaceFolder}",
"toolchainPrefix": "arm-none-eabi",
"serverpath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"stm32cubeprogrammer": "${env:STM32CLT_PATH}/STM32CubeProgrammer/bin",
"stlinkPath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"armToolchainPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin",
"gdbPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin/arm-none-eabi-gdb",
"executable": "${workspaceFolder}/CM7/build/Stepper-H7-CM7.elf",
"name": "Debug CM7 ST-Link V3",
"request": "launch",
"loadFiles": [
"${workspaceFolder}/CM7/build/Stepper-H7-CM7.elf",
"${workspaceFolder}/CM4/build/Stepper-H7-CM4.elf"
],
"servertype": "stlink",
"device": "STM32H755ZI",
"interface": "swd",
"type": "cortex-debug",
"liveWatch": {
"enabled": true,
"samplesPerSecond": 4
},
"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
//"rtos": "FreeRTOS",
"v1": false,
"breakAfterReset": false,
"svdFile": "${workspaceFolder}/CM7/STM32H755_CM7.svd",
"serverArgs": [
"-l", "1",
"-m", "0",
"-k",
"-t","-s"
],
},
{
"preLaunchTask": "Build Stepper All",
"cwd": "${workspaceFolder}",
"toolchainPrefix": "arm-none-eabi",
"serverpath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"stm32cubeprogrammer": "${env:STM32CLT_PATH}/STM32CubeProgrammer/bin",
"stlinkPath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"armToolchainPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin",
"gdbPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin/arm-none-eabi-gdb",
"executable": "${workspaceFolder}/CM4/build/Stepper-H7-CM4.elf",
"name": "Debug CM4 ST-Link V3",
"request": "launch",
"loadFiles": [
"${workspaceFolder}/CM7/build/Stepper-H7-CM7.elf",
"${workspaceFolder}/CM4/build/Stepper-H7-CM4.elf"
],
"servertype": "stlink",
"device": "STM32H755ZI",
"interface": "swd",
"type": "cortex-debug",
"liveWatch": {
"enabled": true,
"samplesPerSecond": 4
},
"runToEntryPoint": "main",
"showDevDebugOutput": "none",
//"rtos": "FreeRTOS",
"v1": false,
"breakAfterReset": false,
"svdFile": "${workspaceFolder}/CM7/STM32H755_CM7.svd",
"serverArgs": [
"-l", "1",
"-m", "3",
"-k",
"-t","-s"
],
},
{
/* In this launch config, the CM4 debug is started,
then we wait 10s for the M0 to boot. After than,
a launch config to attach to the CM0PLUS is started.
*/
"name": "Debug CM7+CM4 - ST-Link V3",
"preLaunchTask": "Build Stepper All",
"cwd": "${workspaceFolder}",
"toolchainPrefix": "arm-none-eabi",
"serverpath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"stm32cubeprogrammer": "${env:STM32CLT_PATH}/STM32CubeProgrammer/bin",
"stlinkPath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"armToolchainPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin",
"gdbPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin/arm-none-eabi-gdb",
"type": "cortex-debug",
"executable": "${workspaceFolder}/CM4/build/Stepper-H7-CM4.elf",
"loadFiles": [
"${workspaceFolder}/CM7/build/Stepper-H7-CM7.elf",
"${workspaceFolder}/CM4/build/Stepper-H7-CM4.elf"
],
"request": "launch",
"servertype": "stlink",
"device": "STM32H755ZI",
"interface": "swd",
"serialNumber": "",
// "runToEntryPoint": "main", // No run to main to let the CM7 reach the start point of the CM4
"svdFile": "${workspaceFolder}/CM4/STM32H755_CM4.svd",
"v1": false,
"showDevDebugOutput": "none",
//"rtos": "FreeRTOS",
"serverArgs": [
"-l", "1",
"-m", "0",
"-k",
"-t","-s"
],
"chainedConfigurations": {
"enabled": true,
"waitOnEvent": "postInit",
"detached": true,
"delayMs":5000, // Wait 5s, could be optimized
"lifecycleManagedByParent": true,
"launches": [
{
"name": "Attach CM4 - ST-Link V3",
"folder": "${workspaceFolder}"
}
]
}
},
{
"name": "Attach CM4 - ST-Link V3",
"cwd": "${workspaceFolder}",
"toolchainPrefix": "arm-none-eabi",
"serverpath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"stm32cubeprogrammer": "${env:STM32CLT_PATH}/STM32CubeProgrammer/bin",
"stlinkPath": "${env:STM32CLT_PATH}/STLink-gdb-server/bin/ST-LINK_gdbserver",
"armToolchainPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin",
"gdbPath": "${env:STM32CLT_PATH}/GNU-tools-for-STM32/bin/arm-none-eabi-gdb",
"type": "cortex-debug",
"executable": "${workspaceFolder}/CM4/build/Stepper-H7-CM4.elf",
"request": "attach",
"servertype": "stlink",
"device": "STM32H755ZI",
"interface": "swd",
"serialNumber": "",
"svdFile": "${workspaceFolder}/CM4/STM32H755_CM4.svd",
"v1": false,
"showDevDebugOutput": "none",
//"rtos": "FreeRTOS",
"serverArgs": [
"-l", "1",
"-m", "3",
"-t", "-s"
]
}
]
}
+67
View File
@@ -0,0 +1,67 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Stepper CM7",
"type": "shell",
"command": "make cm7 -j",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "shared"
}
},
{
"label": "Clean Stepper CM7",
"type": "shell",
"command": "make clean_cm7",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "shared"
}
},
{
"label": "Build Stepper CM4",
"type": "shell",
"command": "make cm4 -j",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "shared"
}
},
{
"label": "Clean Stepper CM4",
"type": "shell",
"command": "make clean_cm4",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "shared"
}
},
{
"label": "Build Stepper All",
"type": "shell",
"command": "make all -j",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "shared"
}
},
{
"label": "Clean Stepper All",
"type": "shell",
"command": "make clean",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "shared"
}
}
]
}
+239
View File
@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug">
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.723556103" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.806559042" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32H755ZITx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.757282483" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="1" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.783921086" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.1332546270" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.840710082" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1708951107" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1794047040" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32H755ZITx || 1 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../OPENAMP | ../Core/Inc | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg | ../../Drivers/STM32H7xx_HAL_Driver/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy | ../../Drivers/CMSIS/Device/ST/STM32H7xx/Include | ../../Drivers/CMSIS/Include | ../../Middlewares/Third_Party/OpenAMP/virtual_driver || || || CORE_CM4 | USE_HAL_DRIVER | STM32H755xx | METAL_INTERNAL | METAL_MAX_DEVICE_REGIONS=2 | RPMSG_BUFFER_SIZE=512 | VIRTIO_SLAVE_ONLY | NO_ATOMIC_64_SUPPORT | USE_PWR_DIRECT_SMPS_SUPPLY || || Core/Src | Drivers | OPENAMP | Core/Startup | Middlewares | Common || || || ${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || || ::" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.748931697" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="200" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.488721960" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/stepper_h7_CM4}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1318599447" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1458329813" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1536391040" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.109707380" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="STM32H7"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.1581271830" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC"/>
<listOptionValue builtIn="false" value="&quot;../NetworkInterface\include&quot;"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Plus-TCP/source/include"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1890037206" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1148966675" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1078836956" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.2111794925" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1628256590" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="CORE_CM4"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32H755xx"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="VIRTIO_SLAVE_ONLY"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="STM32H7"/>
<listOptionValue builtIn="false" value="USE_PWR_DIRECT_SMPS_SUPPLY"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.850611653" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../Core/Inc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Device/ST/STM32H7xx/Include"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM4F"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Plus-TCP/source/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/virtual_driver"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.526395528" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.902743076" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.894383759" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.710612510" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1026008744" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.322088974" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld}" valueType="string"/>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1940166339" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1440088724" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.2079605619" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.863005891" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.2106300160" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.6151998" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.470747306" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.254543041" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.235194216" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.936269605" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common"/>
<entry excluding="Src/sysmem.c|Src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/STM32/Drivers|Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/STM32/Legacy|Third_Party/FreeRTOS-Plus-TCP/source/portable/BufferManagement/BufferAllocation_2.c|Third_Party/FreeRTOS-Plus-TCP/source/portable/Compiler/MSVC|Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/WinPCap|Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/loopback|Third_Party/FreeRTOS-Plus-TCP/tools|Third_Party/FreeRTOS-Plus-TCP/test|Third_Party/FreeRTOS-Plus-TCP/docs|Third_Party/FreeRTOS-Kernel/portable/GCC/ARM_CM7|Third_Party/FreeRTOS-Kernel/portable/MemMang|Third_Party/FreeRTOS-Kernel/portable/MSVC-MingW" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="OPENAMP"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.970102815" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1350597056" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32H755ZITx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.508914889" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="1" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1831010670" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.1349588948" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.1998271548" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1568716835" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.2069485309" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32H755ZITx || 1 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../OPENAMP | ../Core/Inc | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg | ../../Drivers/STM32H7xx_HAL_Driver/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy | ../../Drivers/CMSIS/Device/ST/STM32H7xx/Include | ../../Drivers/CMSIS/Include | ../../Middlewares/Third_Party/OpenAMP/virtual_driver || || || CORE_CM4 | USE_HAL_DRIVER | STM32H755xx | METAL_INTERNAL | METAL_MAX_DEVICE_REGIONS=2 | RPMSG_BUFFER_SIZE=512 | VIRTIO_SLAVE_ONLY | NO_ATOMIC_64_SUPPORT | USE_PWR_DIRECT_SMPS_SUPPLY || || Core/Src | Drivers | OPENAMP | Core/Startup | Middlewares | Common || || || ${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || || ::" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1465973578" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="200" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.663665576" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/stepper_h7_CM4}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1864401437" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.769790340" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.228217637" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.1334690220" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC"/>
<listOptionValue builtIn="false" value="&quot;../NetworkInterface\include&quot;"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Plus-TCP/source/include"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1223470769" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32H7"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1810569406" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1517242463" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.258761432" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.587858670" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.509613710" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORE_CM4"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32H755xx"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="VIRTIO_SLAVE_ONLY"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="STM32H7"/>
<listOptionValue builtIn="false" value="USE_PWR_DIRECT_SMPS_SUPPLY"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1408977795" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../Core/Inc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Device/ST/STM32H7xx/Include"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC"/>
<listOptionValue builtIn="false" value="&quot;../NetworkInterface\include&quot;"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Plus-TCP/source/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/virtual_driver"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1001828055" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1038060313" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.70706873" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.1045958448" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.16464019" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1286652207" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld}" valueType="string"/>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.206618860" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1944024897" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.2021125216" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1559801920" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1530735764" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.146788817" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1805148666" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1226183744" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.396827581" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.512407159" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common"/>
<entry excluding="Src/sysmem.c|Src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/STM32/Drivers|Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/STM32/Legacy|Third_Party/FreeRTOS-Plus-TCP/source/portable/BufferManagement/BufferAllocation_2.c|Third_Party/FreeRTOS-Plus-TCP/source/portable/Compiler/MSVC|Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/WinPCap|Third_Party/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/loopback|Third_Party/FreeRTOS-Plus-TCP/tools|Third_Party/FreeRTOS-Plus-TCP/test|Third_Party/FreeRTOS-Plus-TCP/docs|Third_Party/FreeRTOS-Kernel/portable/GCC/ARM_CM7|Third_Party/FreeRTOS-Kernel/portable/MemMang|Third_Party/FreeRTOS-Kernel/portable/MSVC-MingW" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="OPENAMP"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="stepper_h7_CM4.null.1718649379" name="stepper_h7_CM4"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1517242463;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1001828055">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1148966675;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.526395528">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>
@@ -0,0 +1,3 @@
build
Debug
Release
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-889499008138449637" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.165877640" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-889499008138449637" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,5 @@
\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000=
2F62501ED4689FB349E356AB974DBE57=EF232BB7A78569BB4DEEA5A8CE9841A0
8DF89ED150041C4CBC7CB9A9CAA90856=EF232BB7A78569BB4DEEA5A8CE9841A0
DC22A860405A8BF2F2C095E5B6529F12=6EE9111B96141CC38C9D3E133C3B0FF1
eclipse.preferences.version=1
@@ -0,0 +1,141 @@
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* These parameters and more are described within the 'configuration' section of the
* FreeRTOS API documentation available on the FreeRTOS.org web site.
*
* See http://www.freertos.org/a00110.html
*----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* Section where include file can be added */
/* USER CODE END Includes */
/* Ensure definitions are only used by the compiler, and not by the assembler. */
#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
#include <stdint.h>
extern uint32_t SystemCoreClock;
/* USER CODE BEGIN 0 */
extern void configureTimerForRunTimeStats(void);
extern unsigned long getRunTimeCounterValue(void);
/* USER CODE END 0 */
#endif
#define configENABLE_FPU 1
#define configENABLE_MPU 0
#define configUSE_PREEMPTION 1
#define configSUPPORT_STATIC_ALLOCATION 0
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( SystemCoreClock )
#define configTICK_RATE_HZ ((TickType_t)1000)
#define configMAX_PRIORITIES ( 7 )
#define configMINIMAL_STACK_SIZE ((uint16_t)1024)
#define configTOTAL_HEAP_SIZE ((size_t)0x20000)
#define configMAX_TASK_NAME_LEN ( 16 )
#define configQUEUE_REGISTRY_SIZE ( 32 )
#define configGENERATE_RUN_TIME_STATS 1
#define configUSE_TRACE_FACILITY 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
#define configUSE_16_BIT_TICKS 0
#define configUSE_MUTEXES 1
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
#define configTIMER_QUEUE_LENGTH 8
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 4 )
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 1
#define configUSE_COUNTING_SEMAPHORES 1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */
/* Defaults to size_t for backward compatibility, but can be changed
if lengths will always be less than the number of bytes in a size_t. */
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* The following flag must be enabled only when using newlib */
#define configUSE_NEWLIB_REENTRANT 1
#define configCHECK_HANDLER_INSTALLATION 1
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_xTaskGetSchedulerState 1
/* Cortex-M specific definitions. */
#ifdef __NVIC_PRIO_BITS
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
#define configPRIO_BITS __NVIC_PRIO_BITS
#else
#define configPRIO_BITS 4
#endif
/* The lowest interrupt priority that can be used in a call to a "set priority"
function. */
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
/* The highest interrupt priority that can be used by any interrupt service
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
/* Interrupt priorities used by the kernel port layer itself. These are generic
to all Cortex-M ports, and do not rely on any particular library functions. */
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
/* USER CODE BEGIN 1 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine );
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); vAssertCalled( __FILE__, __LINE__);}
/* USER CODE END 1 */
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
/* IMPORTANT: This define is commented when used with STM32Cube firmware, when the timebase source is SysTick,
to prevent overwriting SysTick_Handler defined within STM32Cube HAL */
//#define xPortSysTickHandler SysTick_Handler
/* USER CODE BEGIN 2 */
/* Definitions needed when configGENERATE_RUN_TIME_STATS is on */
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() //SetupRunTimeStatsTimer
#define portGET_RUN_TIME_COUNTER_VALUE() (xTaskGetTickCount())//GetHighFrequencyTickValue
#define configISR_STACK_SIZE_WORDS 4096
#define configUSE_NEWLIB_REENTRANT 1
/* USER CODE END 2 */
/* USER CODE BEGIN Defines */
#define configAPPLICATION_ALLOCATED_HEAP 1
#define configRECORD_STACK_HIGH_ADDRESS 1 /* 1: record stack high address for the debugger, 0: do not record stack high address */
/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
/* USER CODE END Defines */
#endif /* FREERTOS_CONFIG_H */
@@ -0,0 +1,333 @@
/*
* FreeRTOS+TCP
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://aws.amazon.com/freertos
* http://www.FreeRTOS.org
*/
/*****************************************************************************
*
* See the following URL for configuration information.
* http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html
*
*****************************************************************************/
#ifndef FREERTOS_IP_CONFIG_H
#define FREERTOS_IP_CONFIG_H
#define ipconfigUSE_IPv4 ( 1 )
#define ipconfigUSE_IPv6 ( 0 )
#define ipconfigUSE_DHCPv6 0
#define ipconfigIPv4_BACKWARD_COMPATIBLE 0
#define ipconfigUSE_ARP_REVERSED_LOOKUP 1
#define ipconfigUSE_LOOPBACK 0
#define ipconfigUSE_ARP_REMOVE_ENTRY 1
#define ipconfigARP_STORES_REMOTE_ADDRESSES 1
#define ipconfigUSE_LINKED_RX_MESSAGES 1
#define ipconfigFORCE_IP_DONT_FRAGMENT 1
#define ipconfigUSE_DHCP 1
#define ipconfigDHCP_FALL_BACK_AUTO_IP 1
#define ipconfigARP_USE_CLASH_DETECTION 1
#define ipconfigUSE_LLMNR 0
#define ipconfigUSE_NBNS 0
#define ipconfigUSE_MDNS 0
#define ipconfigSUPPORT_OUTGOING_PINGS 1
#define ipconfigETHERNET_DRIVER_FILTERS_PACKETS 0
#define ipconfigZERO_COPY_TX_DRIVER 1
#define ipconfigZERO_COPY_RX_DRIVER 1
#define ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM 1
#define ipconfigSOCKET_HAS_USER_SEMAPHORE 1
#define ipconfigSELECT_USES_NOTIFY 1
#define ipconfigSUPPORT_SIGNALS 1
#define ipconfigPROCESS_CUSTOM_ETHERNET_FRAMES 0
#define ipconfigDNS_USE_CALLBACKS 0
#define ipconfigIGNORE_UNKNOWN_PACKETS 1
#define ipconfigCHECK_IP_QUEUE_SPACE 1
#define ipconfigUDP_MAX_RX_PACKETS 1
#define ipconfigETHERNET_MINIMUM_PACKET_BYTES 1
#define ipconfigTCP_IP_SANITY 1
#define ipconfigSUPPORT_NETWORK_DOWN_EVENT 1
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
* out the debugging messages. */
#define ipconfigHAS_DEBUG_PRINTF 0
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
#define FreeRTOS_debug_printf( X ) printf X
#endif
/* Set to 1 to print out non debugging messages, for example the output of the
* FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1
* then FreeRTOS_printf should be set to the function used to print out the
* messages. */
#define ipconfigHAS_PRINTF 0
#if ( ipconfigHAS_PRINTF == 1 )
#define FreeRTOS_printf( X ) printf X
#endif
/* Define the byte order of the target MCU (the MCU FreeRTOS+TCP is executing
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
/* If the network card/driver includes checksum offloading then set
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
* stack repeating the checksum calculations. */
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
/* Several API's will block until the result is known, or the action has been
* performed, for example FreeRTOS_send() and FreeRTOS_recv(). The timeouts can be
* set per socket, using setsockopt(). If not set, the times below will be
* used as defaults. */
#define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME ( 5000 )
#define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME ( 5000 )
/* Include support for DNS caching. For TCP, having a small DNS cache is very
* useful. When a cache is present, ipconfigDNS_REQUEST_ATTEMPTS can be kept low
* and also DNS may use small timeouts. If a DNS reply comes in after the DNS
* socket has been destroyed, the result will be stored into the cache. The next
* call to FreeRTOS_gethostbyname() will return immediately, without even creating
* a socket.
*/
#define ipconfigUSE_DNS_CACHE ( 1 )
#define ipconfigDNS_CACHE_ADDRESSES_PER_ENTRY ( 6 )
#define ipconfigDNS_REQUEST_ATTEMPTS ( 2 )
/* The IP stack executes it its own task (although any application task can make
* use of its services through the published sockets API). ipconfigUDP_TASK_PRIORITY
* sets the priority of the task that executes the IP stack. The priority is a
* standard FreeRTOS task priority so can take any value from 0 (the lowest
* priority) to (configMAX_PRIORITIES - 1) (the highest priority).
* configMAX_PRIORITIES is a standard FreeRTOS configuration parameter defined in
* FreeRTOSConfig.h, not FreeRTOSIPConfig.h. Consideration needs to be given as to
* the priority assigned to the task executing the IP stack relative to the
* priority assigned to tasks that use the IP stack. */
#define ipconfigIP_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
/* The size, in words (not bytes), of the stack allocated to the FreeRTOS+TCP
* task. This setting is less important when the FreeRTOS Win32 simulator is used
* as the Win32 simulator only stores a fixed amount of information on the task
* stack. FreeRTOS includes optional stack overflow detection, see:
* http://www.freertos.org/Stacks-and-stack-overflow-checking.html. */
#define ipconfigIP_TASK_STACK_SIZE_WORDS ( configMINIMAL_STACK_SIZE * 5 )
/* If ipconfigUSE_NETWORK_EVENT_HOOK is set to 1 then FreeRTOS+TCP will call the
* network event hook at the appropriate times. If ipconfigUSE_NETWORK_EVENT_HOOK
* is not set to 1 then the network event hook will never be called. See:
* https://freertos.org/Documentation/03-Libraries/02-FreeRTOS-plus/02-FreeRTOS-plus-TCP/09-API-reference/57-vApplicationIPNetworkEventHook.
*/
#define ipconfigUSE_NETWORK_EVENT_HOOK 1
/* Sockets have a send block time attribute. If FreeRTOS_sendto() is called but
* a network buffer cannot be obtained then the calling task is held in the Blocked
* state (so other tasks can continue to executed) until either a network buffer
* becomes available or the send block time expires. If the send block time expires
* then the send operation is aborted. The maximum allowable send block time is
* capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the
* maximum allowable send block time prevents prevents a deadlock occurring when
* all the network buffers are in use and the tasks that process (and subsequently
* free) the network buffers are themselves blocked waiting for a network buffer.
* ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in
* milliseconds can be converted to a time in ticks using pdMS_TO_TICKS().*/
#define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 5000U )
/* If ipconfigUSE_DHCP is 1 then FreeRTOS+TCP will attempt to retrieve an IP
* address, netmask, DNS server address and gateway address from a DHCP server. If
* ipconfigUSE_DHCP is 0 then FreeRTOS+TCP will use a static IP address. The
* stack will revert to using the static IP address even when ipconfigUSE_DHCP is
* set to 1 if a valid configuration cannot be obtained from a DHCP server for any
* reason. The static configuration used is that passed into the stack by the
* FreeRTOS_IPInit() function call. */
#define ipconfigUSE_DHCP 1
#define ipconfigDHCP_REGISTER_HOSTNAME 1
#define ipconfigDHCP_USES_UNICAST 1
/* If ipconfigDHCP_USES_USER_HOOK is set to 1 then the application writer must
* provide an implementation of the DHCP callback function,
* xApplicationDHCPUserHook(). */
#define ipconfigUSE_DHCP_HOOK 1
/* When ipconfigUSE_DHCP is set to 1, DHCP requests will be sent out at
* increasing time intervals until either a reply is received from a DHCP server
* and accepted, or the interval between transmissions reaches
* ipconfigMAXIMUM_DISCOVER_TX_PERIOD. The IP stack will revert to using the
* static IP address passed as a parameter to FreeRTOS_IPInit() if the
* re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without
* a DHCP reply being received. */
#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD pdMS_TO_TICKS( 120000U )
/* The ARP cache is a table that maps IP addresses to MAC addresses. The IP
* stack can only send a UDP message to a remove IP address if it knowns the MAC
* address associated with the IP address, or the MAC address of the router used to
* contact the remote IP address. When a UDP message is received from a remote IP
* address the MAC address and IP address are added to the ARP cache. When a UDP
* message is sent to a remote IP address that does not already appear in the ARP
* cache then the UDP message is replaced by a ARP message that solicits the
* required MAC address information. ipconfigARP_CACHE_ENTRIES defines the maximum
* number of entries that can exist in the ARP table at any one time. */
#define ipconfigARP_CACHE_ENTRIES 6
/* ARP requests that do not result in an ARP response will be re-transmitted a
* maximum of ipconfigMAX_ARP_RETRANSMISSIONS times before the ARP request is
* aborted. */
#define ipconfigMAX_ARP_RETRANSMISSIONS ( 5 )
/* ipconfigMAX_ARP_AGE defines the maximum time between an entry in the ARP
* table being created or refreshed and the entry being removed because it is stale.
* New ARP requests are sent for ARP cache entries that are nearing their maximum
* age. ipconfigMAX_ARP_AGE is specified in tens of seconds, so a value of 150 is
* equal to 1500 seconds (or 25 minutes). */
#define ipconfigMAX_ARP_AGE 150
/* Implementing FreeRTOS_inet_addr() necessitates the use of string handling
* routines, which are relatively large. To save code space the full
* FreeRTOS_inet_addr() implementation is made optional, and a smaller and faster
* alternative called FreeRTOS_inet_addr_quick() is provided. FreeRTOS_inet_addr()
* takes an IP in decimal dot format (for example, "192.168.0.1") as its parameter.
* FreeRTOS_inet_addr_quick() takes an IP address as four separate numerical octets
* (for example, 192, 168, 0, 1) as its parameters. If
* ipconfigINCLUDE_FULL_INET_ADDR is set to 1 then both FreeRTOS_inet_addr() and
* FreeRTOS_indet_addr_quick() are available. If ipconfigINCLUDE_FULL_INET_ADDR is
* not set to 1 then only FreeRTOS_indet_addr_quick() is available. */
#define ipconfigINCLUDE_FULL_INET_ADDR 1
/* ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS defines the total number of network buffer that
* are available to the IP stack. The total number of network buffers is limited
* to ensure the total amount of RAM that can be consumed by the IP stack is capped
* to a pre-determinable value. */
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 20
/* A FreeRTOS queue is used to send events from application tasks to the IP
* stack. ipconfigEVENT_QUEUE_LENGTH sets the maximum number of events that can
* be queued for processing at any one time. The event queue must be a minimum of
* 5 greater than the total number of network buffers. */
#define ipconfigEVENT_QUEUE_LENGTH \
( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 )
/* The address of a socket is the combination of its IP address and its port
* number. FreeRTOS_bind() is used to manually allocate a port number to a socket
* (to 'bind' the socket to a port), but manual binding is not normally necessary
* for client sockets (those sockets that initiate outgoing connections rather than
* wait for incoming connections on a known port number). If
* ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 1 then calling
* FreeRTOS_sendto() on a socket that has not yet been bound will result in the IP
* stack automatically binding the socket to a port number from the range
* socketAUTO_PORT_ALLOCATION_START_NUMBER to 0xffff. If
* ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 0 then calling FreeRTOS_sendto()
* on a socket that has not yet been bound will result in the send operation being
* aborted. */
#define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1
/* Defines the Time To Live (TTL) values used in outgoing UDP packets. */
#define ipconfigUDP_TIME_TO_LIVE 128
/* Also defined in FreeRTOSIPConfigDefaults.h. */
#define ipconfigTCP_TIME_TO_LIVE 128
/* USE_TCP: Use TCP and all its features. */
#define ipconfigUSE_TCP ( 0 )
/* USE_WIN: Let TCP use windowing mechanism. */
#define ipconfigUSE_TCP_WIN ( 1 )
/* The MTU is the maximum number of bytes the payload of a network frame can
* contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a
* lower value can save RAM, depending on the buffer management scheme used. If
* ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must
* be divisible by 8. */
#define ipconfigNETWORK_MTU 1500U
/* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used
* through the FreeRTOS_gethostbyname() API function. */
#define ipconfigUSE_DNS 1
/* If ipconfigREPLY_TO_INCOMING_PINGS is set to 1 then the IP stack will
* generate replies to incoming ICMP echo (ping) requests. */
#define ipconfigREPLY_TO_INCOMING_PINGS 1
/* If ipconfigSUPPORT_OUTGOING_PINGS is set to 1 then the
* FreeRTOS_SendPingRequest() API function is available. */
#define ipconfigSUPPORT_OUTGOING_PINGS 1
/* If ipconfigSUPPORT_SELECT_FUNCTION is set to 1 then the FreeRTOS_select()
* (and associated) API function is available. */
#define ipconfigSUPPORT_SELECT_FUNCTION 1
/* If ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES is set to 1 then Ethernet frames
* that are not in Ethernet II format will be dropped. This option is included for
* potential future IP stack developments. */
#define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1
/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1 then it is the
* responsibility of the Ethernet interface to filter out packets that are of no
* interest. If the Ethernet interface does not implement this functionality, then
* set ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES to 0 to have the IP stack
* perform the filtering instead (it is much less efficient for the stack to do it
* because the packet will already have been passed into the stack). If the
* Ethernet driver does all the necessary filtering in hardware then software
* filtering can be removed by using a value other than 1 or 0. */
#define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1
/* The windows simulator cannot really simulate MAC interrupts, and needs to
* block occasionally to allow other tasks to run. */
#define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY pdMS_TO_TICKS( 20 )
/* Advanced only: in order to access 32-bit fields in the IP packets with
* 32-bit memory instructions, all packets will be stored 32-bit-aligned,
* plus 16-bits. This has to do with the contents of the IP-packets: all
* 32-bit fields are 32-bit-aligned, plus 16-bit. */
#define ipconfigPACKET_FILLER_SIZE 2U
/* Define the size of the pool of TCP window descriptors. On the average, each
* TCP socket will use up to 2 x 6 descriptors, meaning that it can have 2 x 6
* outstanding packets (for Rx and Tx). When using up to 10 TP sockets
* simultaneously, one could define TCP_WIN_SEG_COUNT as 120. */
#define ipconfigTCP_WIN_SEG_COUNT 240
/* Each TCP socket has a circular buffers for Rx and Tx, which have a fixed
* maximum size. Define the size of Rx buffer for TCP sockets. */
#define ipconfigTCP_RX_BUFFER_LENGTH ( 10000 )
/* Define the size of Tx buffer for TCP sockets. */
#define ipconfigTCP_TX_BUFFER_LENGTH ( 10000 )
/* When using call-back handlers, the driver may check if the handler points to
* real program memory (RAM or flash) or just has a random non-zero value. */
#define ipconfigIS_VALID_PROG_ADDRESS( x ) ( ( x ) != NULL )
/* Include support for TCP keep-alive messages. */
#define ipconfigTCP_KEEP_ALIVE ( 1 )
#define ipconfigTCP_KEEP_ALIVE_INTERVAL ( 20 ) /* Seconds. */
#define ipconfigSOCKET_HAS_USER_WAKE_CALLBACK ( 1 )
#define ipconfigUSE_CALLBACKS ( 1 )
#define portINLINE __inline
#define ipconfigISO_STRICTNESS_VIOLATION_START \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop")
#endif /* FREERTOS_IP_CONFIG_H */
@@ -0,0 +1,24 @@
/*
* ipc_eth_consumer.h
*
* Created on: 11.08.2026
* Author: Thorsten
*/
#ifndef INC_IPC_IPC_ETH_CONSUMER_H_
#define INC_IPC_IPC_ETH_CONSUMER_H_
typedef struct IPC_ETH_CONSUMER_Context *IPC_ETH_CONSUMER_Context_t;
typedef struct IPC_ETH_CONSUMER_Handle
{
IPC_ETH_CONSUMER_Context_t priv;
struct
{
} functions;
} *IPC_ETH_CONSUMER_Handle_t;
IPC_ETH_CONSUMER_Handle_t IPC_ETH_CONSUMER_Init(const char *endpoint);
#endif /* INC_IPC_IPC_ETH_CONSUMER_H_ */
@@ -0,0 +1,69 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -0,0 +1,520 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_hal_conf.h
* @author MCD Application Team
* @brief HAL configuration file.
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
#ifndef STM32H7xx_HAL_CONF_H_PRE
#define STM32H7xx_HAL_CONF_H_PRE
#define ETH_RX_BUF_SIZE 1526
#endif
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32H7xx_HAL_CONF_H
#define STM32H7xx_HAL_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* ########################## Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the HAL driver
*/
#define HAL_MODULE_ENABLED
/* #define HAL_ADC_MODULE_ENABLED */
/* #define HAL_FDCAN_MODULE_ENABLED */
/* #define HAL_FMAC_MODULE_ENABLED */
/* #define HAL_CEC_MODULE_ENABLED */
/* #define HAL_COMP_MODULE_ENABLED */
/* #define HAL_CORDIC_MODULE_ENABLED */
/* #define HAL_CRC_MODULE_ENABLED */
/* #define HAL_CRYP_MODULE_ENABLED */
/* #define HAL_DAC_MODULE_ENABLED */
/* #define HAL_DCMI_MODULE_ENABLED */
/* #define HAL_DMA2D_MODULE_ENABLED */
#define HAL_ETH_MODULE_ENABLED
/* #define HAL_ETH_LEGACY_MODULE_ENABLED */
/* #define HAL_NAND_MODULE_ENABLED */
/* #define HAL_NOR_MODULE_ENABLED */
/* #define HAL_OTFDEC_MODULE_ENABLED */
/* #define HAL_SRAM_MODULE_ENABLED */
/* #define HAL_SDRAM_MODULE_ENABLED */
/* #define HAL_HASH_MODULE_ENABLED */
/* #define HAL_HRTIM_MODULE_ENABLED */
/* #define HAL_HSEM_MODULE_ENABLED */
/* #define HAL_GFXMMU_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_OPAMP_MODULE_ENABLED */
/* #define HAL_OSPI_MODULE_ENABLED */
/* #define HAL_I2S_MODULE_ENABLED */
/* #define HAL_SMBUS_MODULE_ENABLED */
/* #define HAL_IWDG_MODULE_ENABLED */
/* #define HAL_LPTIM_MODULE_ENABLED */
/* #define HAL_LTDC_MODULE_ENABLED */
/* #define HAL_QSPI_MODULE_ENABLED */
/* #define HAL_RAMECC_MODULE_ENABLED */
/* #define HAL_RNG_MODULE_ENABLED */
/* #define HAL_RTC_MODULE_ENABLED */
/* #define HAL_SAI_MODULE_ENABLED */
/* #define HAL_SD_MODULE_ENABLED */
/* #define HAL_MMC_MODULE_ENABLED */
/* #define HAL_SPDIFRX_MODULE_ENABLED */
/* #define HAL_SPI_MODULE_ENABLED */
/* #define HAL_SWPMI_MODULE_ENABLED */
/* #define HAL_TIM_MODULE_ENABLED */
/* #define HAL_UART_MODULE_ENABLED */
/* #define HAL_USART_MODULE_ENABLED */
/* #define HAL_IRDA_MODULE_ENABLED */
/* #define HAL_SMARTCARD_MODULE_ENABLED */
/* #define HAL_WWDG_MODULE_ENABLED */
/* #define HAL_PCD_MODULE_ENABLED */
/* #define HAL_HCD_MODULE_ENABLED */
/* #define HAL_DFSDM_MODULE_ENABLED */
/* #define HAL_DSI_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_MDIOS_MODULE_ENABLED */
/* #define HAL_PSSI_MODULE_ENABLED */
/* #define HAL_DTS_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED
#define HAL_MDMA_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
#define HAL_HSEM_MODULE_ENABLED
/* ########################## Oscillator Values adaptation ####################*/
/**
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSE is used as system clock source, directly or through the PLL).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE (8000000UL) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */
#endif /* HSE_VALUE */
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT (100UL) /*!< Time out for HSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */
/**
* @brief Internal oscillator (CSI) default value.
* This value is the default CSI value after Reset.
*/
#if !defined (CSI_VALUE)
#define CSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/
#endif /* CSI_VALUE */
/**
* @brief Internal High Speed oscillator (HSI) value.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSI is used as system clock source, directly or through the PLL).
*/
#if !defined (HSI_VALUE)
#define HSI_VALUE (64000000UL) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */
/**
* @brief External Low Speed oscillator (LSE) value.
* This value is used by the UART, RTC HAL module to compute the system frequency
*/
#if !defined (LSE_VALUE)
#define LSE_VALUE (32768UL) /*!< Value of the External oscillator in Hz*/
#endif /* LSE_VALUE */
#if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */
#endif /* LSE_STARTUP_TIMEOUT */
#if !defined (LSI_VALUE)
#define LSI_VALUE (32000UL) /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature.*/
/**
* @brief External clock source for I2S peripheral
* This value is used by the I2S HAL module to compute the I2S clock source
* frequency, this source is inserted directly through I2S_CKIN pad.
*/
#if !defined (EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE 12288000UL /*!< Value of the External clock in Hz*/
#endif /* EXTERNAL_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE,
=== you can define the HSE value in your toolchain compiler preprocessor. */
/* ########################### System Configuration ######################### */
/**
* @brief This is the HAL system configuration section
*/
#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY (15UL) /*!< tick interrupt priority */
#define USE_RTOS 0
#define USE_SD_TRANSCEIVER 0U /*!< use uSD Transceiver */
#define USE_SPI_CRC 0U /*!< use CRC in SPI */
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */
#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U /* CORDIC register callback disabled */
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
#define USE_HAL_DTS_REGISTER_CALLBACKS 0U /* DTS register callback disabled */
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */
#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U /* FMAC register callback disabled */
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U /* GFXMMU register callback disabled */
#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U /* OSPI register callback disabled */
#define USE_HAL_OTFDEC_REGISTER_CALLBACKS 0U /* OTFDEC register callback disabled */
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
/* ########################### Ethernet Configuration ######################### */
#define ETH_TX_DESC_CNT 4U /* number of Ethernet Tx DMA descriptors */
#define ETH_RX_DESC_CNT 4U /* number of Ethernet Rx DMA descriptors */
#define ETH_MAC_ADDR0 (0x02UL)
#define ETH_MAC_ADDR1 (0x00UL)
#define ETH_MAC_ADDR2 (0x00UL)
#define ETH_MAC_ADDR3 (0x00UL)
#define ETH_MAC_ADDR4 (0x00UL)
#define ETH_MAC_ADDR5 (0x00UL)
/* ########################## Assert Selection ############################## */
/**
* @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code
*/
/* #define USE_FULL_ASSERT 1U */
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include module's header file
*/
#ifdef HAL_RCC_MODULE_ENABLED
#include "stm32h7xx_hal_rcc.h"
#endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32h7xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32h7xx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_MDMA_MODULE_ENABLED
#include "stm32h7xx_hal_mdma.h"
#endif /* HAL_MDMA_MODULE_ENABLED */
#ifdef HAL_HASH_MODULE_ENABLED
#include "stm32h7xx_hal_hash.h"
#endif /* HAL_HASH_MODULE_ENABLED */
#ifdef HAL_DCMI_MODULE_ENABLED
#include "stm32h7xx_hal_dcmi.h"
#endif /* HAL_DCMI_MODULE_ENABLED */
#ifdef HAL_DMA2D_MODULE_ENABLED
#include "stm32h7xx_hal_dma2d.h"
#endif /* HAL_DMA2D_MODULE_ENABLED */
#ifdef HAL_DSI_MODULE_ENABLED
#include "stm32h7xx_hal_dsi.h"
#endif /* HAL_DSI_MODULE_ENABLED */
#ifdef HAL_DFSDM_MODULE_ENABLED
#include "stm32h7xx_hal_dfsdm.h"
#endif /* HAL_DFSDM_MODULE_ENABLED */
#ifdef HAL_DTS_MODULE_ENABLED
#include "stm32h7xx_hal_dts.h"
#endif /* HAL_DTS_MODULE_ENABLED */
#ifdef HAL_ETH_MODULE_ENABLED
#include "stm32h7xx_hal_eth.h"
#endif /* HAL_ETH_MODULE_ENABLED */
#ifdef HAL_ETH_LEGACY_MODULE_ENABLED
#include "stm32h7xx_hal_eth_legacy.h"
#endif /* HAL_ETH_LEGACY_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32h7xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32h7xx_hal_cortex.h"
#endif /* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_ADC_MODULE_ENABLED
#include "stm32h7xx_hal_adc.h"
#endif /* HAL_ADC_MODULE_ENABLED */
#ifdef HAL_FDCAN_MODULE_ENABLED
#include "stm32h7xx_hal_fdcan.h"
#endif /* HAL_FDCAN_MODULE_ENABLED */
#ifdef HAL_CEC_MODULE_ENABLED
#include "stm32h7xx_hal_cec.h"
#endif /* HAL_CEC_MODULE_ENABLED */
#ifdef HAL_COMP_MODULE_ENABLED
#include "stm32h7xx_hal_comp.h"
#endif /* HAL_COMP_MODULE_ENABLED */
#ifdef HAL_CORDIC_MODULE_ENABLED
#include "stm32h7xx_hal_cordic.h"
#endif /* HAL_CORDIC_MODULE_ENABLED */
#ifdef HAL_CRC_MODULE_ENABLED
#include "stm32h7xx_hal_crc.h"
#endif /* HAL_CRC_MODULE_ENABLED */
#ifdef HAL_CRYP_MODULE_ENABLED
#include "stm32h7xx_hal_cryp.h"
#endif /* HAL_CRYP_MODULE_ENABLED */
#ifdef HAL_DAC_MODULE_ENABLED
#include "stm32h7xx_hal_dac.h"
#endif /* HAL_DAC_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32h7xx_hal_flash.h"
#endif /* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_GFXMMU_MODULE_ENABLED
#include "stm32h7xx_hal_gfxmmu.h"
#endif /* HAL_GFXMMU_MODULE_ENABLED */
#ifdef HAL_FMAC_MODULE_ENABLED
#include "stm32h7xx_hal_fmac.h"
#endif /* HAL_FMAC_MODULE_ENABLED */
#ifdef HAL_HRTIM_MODULE_ENABLED
#include "stm32h7xx_hal_hrtim.h"
#endif /* HAL_HRTIM_MODULE_ENABLED */
#ifdef HAL_HSEM_MODULE_ENABLED
#include "stm32h7xx_hal_hsem.h"
#endif /* HAL_HSEM_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32h7xx_hal_sram.h"
#endif /* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED
#include "stm32h7xx_hal_nor.h"
#endif /* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32h7xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED
#include "stm32h7xx_hal_i2c.h"
#endif /* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_I2S_MODULE_ENABLED
#include "stm32h7xx_hal_i2s.h"
#endif /* HAL_I2S_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32h7xx_hal_iwdg.h"
#endif /* HAL_IWDG_MODULE_ENABLED */
#ifdef HAL_JPEG_MODULE_ENABLED
#include "stm32h7xx_hal_jpeg.h"
#endif /* HAL_JPEG_MODULE_ENABLED */
#ifdef HAL_MDIOS_MODULE_ENABLED
#include "stm32h7xx_hal_mdios.h"
#endif /* HAL_MDIOS_MODULE_ENABLED */
#ifdef HAL_MMC_MODULE_ENABLED
#include "stm32h7xx_hal_mmc.h"
#endif /* HAL_MMC_MODULE_ENABLED */
#ifdef HAL_LPTIM_MODULE_ENABLED
#include "stm32h7xx_hal_lptim.h"
#endif /* HAL_LPTIM_MODULE_ENABLED */
#ifdef HAL_LTDC_MODULE_ENABLED
#include "stm32h7xx_hal_ltdc.h"
#endif /* HAL_LTDC_MODULE_ENABLED */
#ifdef HAL_OPAMP_MODULE_ENABLED
#include "stm32h7xx_hal_opamp.h"
#endif /* HAL_OPAMP_MODULE_ENABLED */
#ifdef HAL_OSPI_MODULE_ENABLED
#include "stm32h7xx_hal_ospi.h"
#endif /* HAL_OSPI_MODULE_ENABLED */
#ifdef HAL_OTFDEC_MODULE_ENABLED
#include "stm32h7xx_hal_otfdec.h"
#endif /* HAL_OTFDEC_MODULE_ENABLED */
#ifdef HAL_PSSI_MODULE_ENABLED
#include "stm32h7xx_hal_pssi.h"
#endif /* HAL_PSSI_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED
#include "stm32h7xx_hal_pwr.h"
#endif /* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_QSPI_MODULE_ENABLED
#include "stm32h7xx_hal_qspi.h"
#endif /* HAL_QSPI_MODULE_ENABLED */
#ifdef HAL_RAMECC_MODULE_ENABLED
#include "stm32h7xx_hal_ramecc.h"
#endif /* HAL_RAMECC_MODULE_ENABLED */
#ifdef HAL_RNG_MODULE_ENABLED
#include "stm32h7xx_hal_rng.h"
#endif /* HAL_RNG_MODULE_ENABLED */
#ifdef HAL_RTC_MODULE_ENABLED
#include "stm32h7xx_hal_rtc.h"
#endif /* HAL_RTC_MODULE_ENABLED */
#ifdef HAL_SAI_MODULE_ENABLED
#include "stm32h7xx_hal_sai.h"
#endif /* HAL_SAI_MODULE_ENABLED */
#ifdef HAL_SD_MODULE_ENABLED
#include "stm32h7xx_hal_sd.h"
#endif /* HAL_SD_MODULE_ENABLED */
#ifdef HAL_SDRAM_MODULE_ENABLED
#include "stm32h7xx_hal_sdram.h"
#endif /* HAL_SDRAM_MODULE_ENABLED */
#ifdef HAL_SPI_MODULE_ENABLED
#include "stm32h7xx_hal_spi.h"
#endif /* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_SPDIFRX_MODULE_ENABLED
#include "stm32h7xx_hal_spdifrx.h"
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
#ifdef HAL_SWPMI_MODULE_ENABLED
#include "stm32h7xx_hal_swpmi.h"
#endif /* HAL_SWPMI_MODULE_ENABLED */
#ifdef HAL_TIM_MODULE_ENABLED
#include "stm32h7xx_hal_tim.h"
#endif /* HAL_TIM_MODULE_ENABLED */
#ifdef HAL_UART_MODULE_ENABLED
#include "stm32h7xx_hal_uart.h"
#endif /* HAL_UART_MODULE_ENABLED */
#ifdef HAL_USART_MODULE_ENABLED
#include "stm32h7xx_hal_usart.h"
#endif /* HAL_USART_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32h7xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32h7xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32h7xx_hal_smbus.h"
#endif /* HAL_SMBUS_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32h7xx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32h7xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_HCD_MODULE_ENABLED
#include "stm32h7xx_hal_hcd.h"
#endif /* HAL_HCD_MODULE_ENABLED */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t *file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif /* STM32H7xx_HAL_CONF_H */
@@ -0,0 +1,69 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_it.h
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32H7xx_IT_H
#define __STM32H7xx_IT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void ETH_IRQHandler(void);
void CM7_SEV_IRQHandler(void);
void HSEM2_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
#ifdef __cplusplus
}
#endif
#endif /* __STM32H7xx_IT_H */
@@ -0,0 +1,466 @@
/*
* ipc_eth_consumer.c
*
* Created on: 11.08.2026
* Author: Thorsten
*/
//---------------------------------------------------------------------------------------------------------------------
#include "main.h"
#include "openamp.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
#include "FreeRTOS_IP.h"
#include "FreeRTOS_Sockets.h"
#include "message_buffer.h"
//---------------------------------------------------------------------------------------------------------------------
#include "IPC/ipc_eth_consumer.h"
//---------------------------------------------------------------------------------------------------------------------
struct IPC_ETH_CONSUMER_Context
//---------------------------------------------------------------------------------------------------------------------
{
struct rpmsg_endpoint rp_endpoint;
MessageBufferHandle_t mbufH;
TaskHandle_t taskH;
QueueHandle_t reqQH;
int running;
char endpoint[64];
char payload[1520];
char rxNetBuff[1520];
uint32_t ipaddr;
uint32_t bcast;
uint32_t subnet;
int ready;
};
//---------------------------------------------------------------------------------------------------------------------
#define IPC_PKT_HEADERLEN (20 )
#define IPC_PKT_CONTROL_TYPE (0xDEADBEEF )
#define IPC_PKT_ETHERNET_TYPE (0xDEADC0DE )
#define IPC_PKT_DISCOVERY_TYPE (0xDEADDA7A )
#define IPC_PKT_MAXSIZE (RPMSG_BUFFER_SIZE-32-IPC_PKT_HEADERLEN)
#define IPC_CTRL_TYPE_GETPENDING (0x80 )
#define IPC_CTRL_TYPE_GETIPADDR (0xF0 )
#define IPC_CTRL_TYPE_GETSUBNET (0xF1 )
#define IPC_CTRLREMOTE_SPINDLE_START (0xA0 )
#define IPC_CTRLREMOTE_SPINDLE_STOP (0xA1 )
#define IPC_CTRLREMOTE_STEP_RESET (0xA2 )
#define IPC_CTRLREMOTE_STEP_REF (0xA3 )
#define IPC_CTRLREMOTE_STEP_ON (0xA4 )
#define IPC_CTRLREMOTE_STEP_OFF (0xA5 )
#define IPC_CTRLREMOTE_STEP_MOVE (0xA6 )
#define IPC_CTRLREMOTE_MAX_LENGTH (20 )
//---------------------------------------------------------------------------------------------------------------------
typedef struct ipc_eth_packet
//---------------------------------------------------------------------------------------------------------------------
{
unsigned int magic;
unsigned int type;
unsigned int length;
unsigned int seqID;
int result;
char payload[IPC_PKT_MAXSIZE];
} __attribute__((packed)) ipc_eth_packet_t;
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t heartbeatPayload = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_DISCOVERY_TYPE,
.type = 0,
.length = 37,
.result = 0,
.seqID = 0,
.payload = "Hello from STM32H755ZI-Q on ARM CM4!"
};
//---------------------------------------------------------------------------------------------------------------------
static int ipc_eth_ConsumerRpMsgRxClb(struct rpmsg_endpoint *ep, void *data, size_t len, uint32_t src, void *priv)
//---------------------------------------------------------------------------------------------------------------------
{
(void)ep;
(void)src;
if(!priv)
return -1;
IPC_ETH_CONSUMER_Handle_t h = (IPC_ETH_CONSUMER_Handle_t)priv;
if(len < IPC_PKT_HEADERLEN)
return 0;
if(!h->priv->ready)
{
ipc_eth_packet_t *req = (ipc_eth_packet_t *)data;
req->result = -2;
req->length = 0;
OPENAMP_send(&h->priv->rp_endpoint, req, req->length + IPC_PKT_HEADERLEN);
return 0;
}
// ignore overflow cases, because we can not give errors back in that framework
xMessageBufferSend(h->priv->mbufH, data, len, 0);
return 0;
}
//---------------------------------------------------------------------------------------------------------------------
static int ipc_eth_ConsumerHandleControl(IPC_ETH_CONSUMER_Handle_t h, ipc_eth_packet_t *req)
//---------------------------------------------------------------------------------------------------------------------
{
if (!req)
return -1;
req->length = 0;
if(req->type != IPC_CTRL_TYPE_GETIPADDR && req->type != IPC_CTRL_TYPE_GETSUBNET && req->type != IPC_CTRL_TYPE_GETPENDING)
return -1;
if( req->type != IPC_CTRL_TYPE_GETPENDING) {
req->length = 4;
uint32_t source = h->priv->ipaddr;
if ( req->type == IPC_CTRL_TYPE_GETSUBNET )
source = h->priv->subnet;
memcpy(req->payload, &source, sizeof(source));
}
else {
int index = 0;
req->result = 0;
while( pdPASS == xQueueReceive(h->priv->reqQH, &req->payload[index * (IPC_CTRLREMOTE_MAX_LENGTH+IPC_PKT_HEADERLEN)], 0) ) {
index += 1;
if ( index > 8)
break;
req->length = index * (IPC_CTRLREMOTE_MAX_LENGTH+IPC_PKT_HEADERLEN);
}
}
return 0;
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ConsumerTaskFunction( void * arg )
//---------------------------------------------------------------------------------------------------------------------
{
IPC_ETH_CONSUMER_Handle_t h = (IPC_ETH_CONSUMER_Handle_t)arg;
size_t bLen = 0;
int rxLen = 0;
BaseType_t ret;
Socket_t xSocket = FREERTOS_INVALID_SOCKET;
const TickType_t tmFlag = 0;
struct freertos_sockaddr xDestinationAddress;
struct freertos_sockaddr xLocalAddress;
struct freertos_sockaddr xRecvAddress;
socklen_t xRecvAddressLen;
int status = 0;
int rounds = 0;
uint32_t ulIPAddress;
uint32_t ulBroadcast;
uint32_t ulNetMask;
NetworkInterface_t *pxInterface = NULL;
NetworkEndPoint_t *pxEndPoint = NULL;;
if(!h)
goto error;
if (!h->priv)
goto error;
MAILBOX_Init();
if (MX_OPENAMP_Init(RPMSG_REMOTE, NULL))
goto error;
status = OPENAMP_create_endpoint(&h->priv->rp_endpoint, h->priv->endpoint, RPMSG_ADDR_ANY,
ipc_eth_ConsumerRpMsgRxClb, NULL);
if (status < 0)
goto error;
// set this instance as private data
h->priv->rp_endpoint.priv = h;
h->priv->ready = 0;
while(h->priv->running) {
h->priv->ready = 0;
rounds = 0;
heartbeatPayload.seqID = 0;
// make sure, we always proceed only, when the stack is ready!
while(xIPIsNetworkTaskReady() == pdFALSE) {
vTaskDelay(pdMS_TO_TICKS(1));
OPENAMP_check_for_message();
if (h->priv->running == 0)
break;
}
pxInterface = FreeRTOS_FirstNetworkInterface();
if(pxInterface == NULL) {
goto error;
}
// wait for PHY link detection
if (pxInterface->pfGetPhyLinkStatus != NULL)
{
while(pxInterface->pfGetPhyLinkStatus(pxInterface) != pdTRUE ) {
vTaskDelay(pdMS_TO_TICKS(1));
OPENAMP_check_for_message();
if (h->priv->running == 0)
break;
}
}
pxEndPoint = FreeRTOS_FirstEndPoint( pxInterface );
while( pxEndPoint != NULL )
{
#if ( ipconfigUSE_IPv6 != 0 )
if( pxEndPoint->bits.bIPv6 != pdFALSE ) {
pxEndPoint = FreeRTOS_NextEndPoint( pxInterface, pxEndPoint );
continue;
}
#endif
break;
}
if( pxEndPoint == NULL ) {
goto error;
}
xSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP );
if(xSocket == FREERTOS_INVALID_SOCKET) {
h->priv->running = 0;
}
if ( xSocket != FREERTOS_INVALID_SOCKET ) {
// in free rtos stack we do not have to set the broadcast flag for a socket explicitly!
//ret = FreeRTOS_setsockopt(xSocket, 0, SO_BROADCAST, &bFlag, sizeof(bFlag));
//if(ret) {
// FreeRTOS_closesocket(xSocket);
// h->priv->running = 0;
//}
// we set the reception timeout to zero here
ret = FreeRTOS_setsockopt(xSocket, 0, FREERTOS_SO_RCVTIMEO, &tmFlag, sizeof(tmFlag));
if(ret) {
FreeRTOS_closesocket(xSocket);
h->priv->running = 0;
}
//why the hack the broadcast address is completely wrong in this network stack? we fix it now!
pxEndPoint->ipv4_defaults.ulBroadcastAddress = ( pxEndPoint->ipv4_defaults.ulIPAddress & pxEndPoint->ipv4_defaults.ulNetMask )
| ~pxEndPoint->ipv4_defaults.ulNetMask;
pxEndPoint->ipv4_settings.ulBroadcastAddress = ( pxEndPoint->ipv4_settings.ulIPAddress & pxEndPoint->ipv4_settings.ulNetMask )
| ~pxEndPoint->ipv4_settings.ulNetMask;
if (pxEndPoint->ipv4_settings.ulIPAddress == 0) {
ulIPAddress = pxEndPoint->ipv4_defaults.ulIPAddress;
ulNetMask = pxEndPoint->ipv4_defaults.ulNetMask;
ulBroadcast = pxEndPoint->ipv4_defaults.ulBroadcastAddress;
}
else{
ulIPAddress = pxEndPoint->ipv4_settings.ulIPAddress;
ulNetMask = pxEndPoint->ipv4_settings.ulNetMask;
ulBroadcast = pxEndPoint->ipv4_settings.ulBroadcastAddress;
}
h->priv->ipaddr = ulIPAddress;
h->priv->bcast = ulBroadcast;
h->priv->subnet = ulNetMask;
xDestinationAddress.sin_len = sizeof(xDestinationAddress);
xDestinationAddress.sin_address.ulIP_IPv4 = ulBroadcast;
xDestinationAddress.sin_port = FreeRTOS_htons( 10000 );
xDestinationAddress.sin_family = FREERTOS_AF_INET4;
xLocalAddress.sin_len = sizeof(xLocalAddress);
xLocalAddress.sin_address.ulIP_IPv4 = 0;
xLocalAddress.sin_port = FreeRTOS_htons( 10000 );
xLocalAddress.sin_family = FREERTOS_AF_INET4;
OPENAMP_check_for_message();
ret = FreeRTOS_bind(xSocket, &xLocalAddress, sizeof(struct freertos_sockaddr));
if(ret) {
FreeRTOS_closesocket(xSocket);
h->priv->running = 0;
}
}
while(h->priv->running) {
rounds += 1;
OPENAMP_check_for_message();
h->priv->ready = 1;
// only accept valid packets with at least the full packet size, otherwise ignore them!
if ( (bLen = xMessageBufferReceive(h->priv->mbufH, h->priv->payload, sizeof(h->priv->payload), pdMS_TO_TICKS(1))) >= IPC_PKT_HEADERLEN) {
// check header to decide whether the packet is for control purpose or desired for
// Ethernet transmission
ipc_eth_packet_t *req = (ipc_eth_packet_t *)h->priv->payload;
if (req->length <= (bLen - IPC_PKT_HEADERLEN))
{
switch (req->magic)
{
case IPC_PKT_CONTROL_TYPE:
{
req->result = -1;
req->result = ipc_eth_ConsumerHandleControl(h, req);
break;
}
case IPC_PKT_ETHERNET_TYPE:
{
req->result = FreeRTOS_sendto( xSocket, req->payload, req->length, 0,
&xDestinationAddress, sizeof( xDestinationAddress ));
req->length = 0;
break;
}
case IPC_PKT_DISCOVERY_TYPE:
{
req->result = FreeRTOS_sendto( xSocket, req, req->length + IPC_PKT_HEADERLEN, 0,
&xDestinationAddress, sizeof( xDestinationAddress ));
req->length = 0;
break;
}
default:
{
req->result = -1;
req->length = 0;
break;
}
}
OPENAMP_check_for_message();
OPENAMP_send(&h->priv->rp_endpoint, req, req->length + IPC_PKT_HEADERLEN);
}
}
if( rounds >= 1000 ) {
OPENAMP_check_for_message();
if (FreeRTOS_sendto( xSocket, &heartbeatPayload, heartbeatPayload.length + IPC_PKT_HEADERLEN,
0, &xDestinationAddress, sizeof( xDestinationAddress ) ) < 0 ) {
break;
}
rounds = 0;
}
if ((rxLen = FreeRTOS_recvfrom(xSocket, h->priv->rxNetBuff, sizeof(h->priv->rxNetBuff),
0, &xRecvAddress, &xRecvAddressLen)) >= IPC_PKT_HEADERLEN) {
OPENAMP_check_for_message();
ipc_eth_packet_t *req = (ipc_eth_packet_t *)h->priv->rxNetBuff;
if (req->magic == IPC_PKT_CONTROL_TYPE && req->type >= IPC_CTRLREMOTE_SPINDLE_START &&
req->type <= IPC_CTRLREMOTE_STEP_MOVE && req->length <= IPC_CTRLREMOTE_MAX_LENGTH) {
// ignore overruns in case we have some
if( req->length <= (size_t)rxLen - IPC_PKT_HEADERLEN )
xQueueSend(h->priv->reqQH, req, 0);
}
}
else if(rxLen < 0 && rxLen != FREERTOS_EWOULDBLOCK) {
// socket error, so jump out of loop
break;
}
// check PHY link detection
if (pxInterface->pfGetPhyLinkStatus != NULL)
{
if(pxInterface->pfGetPhyLinkStatus(pxInterface) != pdTRUE ) {
break;
}
}
}
h->priv->ready = 0;
FreeRTOS_closesocket(xSocket);
xSocket = FREERTOS_INVALID_SOCKET;
}
error:
if (xSocket != FREERTOS_INVALID_SOCKET) {
FreeRTOS_closesocket(xSocket);
}
if (h) {
if (h->priv) {
if (h->priv->rp_endpoint.priv == h) {
// no abstraction for destroying, so calling library function directly
rpmsg_destroy_ept(&h->priv->rp_endpoint);
}
}
}
OPENAMP_DeInit();
vTaskDelete(NULL);
}
//---------------------------------------------------------------------------------------------------------------------
IPC_ETH_CONSUMER_Handle_t IPC_ETH_CONSUMER_Init(const char *endpoint)
//---------------------------------------------------------------------------------------------------------------------
{
IPC_ETH_CONSUMER_Handle_t h = NULL;
if(!endpoint)
goto error;
if(endpoint[0] == '\0')
goto error;
if(!(h = (IPC_ETH_CONSUMER_Handle_t)calloc(1, sizeof(struct IPC_ETH_CONSUMER_Handle))))
goto error;
h->priv = (IPC_ETH_CONSUMER_Context_t)calloc(1, sizeof(struct IPC_ETH_CONSUMER_Context));
if(!h->priv)
goto error;
if ((h->priv->mbufH = xMessageBufferCreate(4*IPC_PKT_MAXSIZE)) == NULL)
goto error;
if ((h->priv->reqQH = xQueueCreate(6, IPC_PKT_HEADERLEN + IPC_CTRLREMOTE_MAX_LENGTH)) == NULL)
goto error;
strncpy(h->priv->endpoint, endpoint,
sizeof(h->priv->endpoint)-1 < strlen(endpoint) ?
sizeof(h->priv->endpoint)-1 : strlen(endpoint));
h->priv->endpoint[sizeof(h->priv->endpoint)-1] = '\0';
h->priv->running = 1;
if (pdPASS != xTaskCreate(ipc_eth_ConsumerTaskFunction, "ipc2eth", 4096, h, configMAX_PRIORITIES - 3, &h->priv->taskH))
goto error;
return h;
error:
if (h) {
if(h->priv) {
if(h->priv->taskH) {
h->priv->running = 0;
vTaskDelete(h->priv->taskH);
}
if(h->priv->mbufH) {
vMessageBufferDelete(h->priv->mbufH);
}
if(h->priv->reqQH) {
vQueueDelete(h->priv->reqQH);
}
free(h->priv);
}
free(h);
}
h = NULL;
return h;
}
@@ -0,0 +1,505 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "string.h"
#include "openamp.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
#include "FreeRTOS_IP.h"
#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_DHCP.h"
#include "FreeRTOS_Routing.h"
#include "IPC/ipc_eth_consumer.h"
#include <stdint.h>
#include <string.h>
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
extern void initialise_stdlib_abstraction( void );
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#ifndef HSEM_ID_0
#define HSEM_ID_0 (0U) /* HW semaphore 0*/
#endif
typedef struct {
uint32_t w[3]; // STM32 UUID: 96 Bit
} uuid96_t;
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
#if 0
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma location=0x10040000
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */
#pragma location=0x10040080
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */
#elif defined ( __CC_ARM ) /* MDK ARM Compiler */
__attribute__((at(0x10040000))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */
__attribute__((at(0x10040080))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */
#elif defined ( __GNUC__ ) /* GNU Compiler */
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDescripSection"))); /* Ethernet Rx DMA Descriptors */
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDescripSection"))); /* Ethernet Tx DMA Descriptors */
#endif
ETH_TxPacketConfig TxConfig;
ETH_HandleTypeDef heth;
/* USER CODE BEGIN PV */
#endif
ETH_HandleTypeDef heth;
static UBaseType_t ulNextRand;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
static void MX_GPIO_Init(void);
static void MX_ETH_Init(void);
/* USER CODE BEGIN PFP */
extern void initialise_stdlib_abstraction( void );
#define BKPSRAM_BASE 0x38800000UL
typedef struct {
uint32_t magic;
uint32_t uuid[3];
} device_shared_t;
#define DEVICE_SHARED \
((volatile device_shared_t *)BKPSRAM_BASE)
static inline void stm32_read_uuid(uuid96_t *u)
{
if(DEVICE_SHARED->magic != 0x48475531) {
u->w[0] = 0xDEADC0DE;
u->w[1] = 0xBADEAFFE;
u->w[2] = 0xCAFEBABE;
} else {
u->w[0] = DEVICE_SHARED->uuid[0];
u->w[1] = DEVICE_SHARED->uuid[1];
u->w[2] = DEVICE_SHARED->uuid[2];
}
}
static uint32_t mix32(uint32_t x)
{
x ^= x >> 16;
x *= 0x7feb352d;
x ^= x >> 15;
x *= 0x846ca68b;
x ^= x >> 16;
return x;
}
static void uuid_to_mac(uint8_t mac[6], uint32_t ifidx)
{
uuid96_t u;
stm32_read_uuid(&u);
uint32_t a = mix32(u.w[0] ^ u.w[2] ^ ifidx);
uint32_t b = mix32(u.w[1] ^ (ifidx * 0x9e3779b9u));
mac[0] = (uint8_t)(a >> 24);
mac[1] = (uint8_t)(a >> 16);
mac[2] = (uint8_t)(a >> 8);
mac[3] = (uint8_t)(a);
mac[4] = (uint8_t)(b >> 8);
mac[5] = (uint8_t)(b);
mac[0] &= 0xFE; // unicast
mac[0] |= 0x02; // locally administered
}
static uint32_t uuid_to_seed(uint32_t ifidx)
{
uuid96_t u;
stm32_read_uuid(&u);
return mix32(u.w[0] ^ u.w[1] ^ u.w[2] ^ (ifidx * 0x9e3779b9u));
}
static uint32_t uuid_to_ipv4_lla(uint32_t ifidx)
{
uuid96_t u;
stm32_read_uuid(&u);
uint32_t h = mix32(u.w[0] ^ u.w[1] ^ u.w[2] ^ (ifidx * 0x9e3779b9u));
uint8_t x = 1 + ((h >> 8) % 254);
uint8_t y = 1 + (h & 0xFF);
return (169u << 24) | (254u << 16) | ((uint32_t)x << 8) | y;
}
void vApplicationMallocFailedHook( void )
{
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
void vAssertCalled( const char * const pcFileName, unsigned long ulLine )
{
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
taskENTER_CRITICAL();
{
/* You can step out of this function to debug the assertion by using
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
}
}
taskEXIT_CRITICAL();
}
int __stdout_put_char(int ch)
{
(void)ch;
return 0;
}
int __stdin_get_char(void)
{
return EOF;
}
void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
struct xNetworkEndPoint * pxEndPoint )
{
(void)pxEndPoint;
static BaseType_t xTasksAlreadyCreated = pdFALSE;
/* If the network has just come up...*/
if( ( eNetworkEvent == eNetworkUp ) && ( xTasksAlreadyCreated == pdFALSE ) )
{
/* Do nothing. Just a stub. */
xTasksAlreadyCreated = pdTRUE;
}
}
UBaseType_t uxRand( void )
{
static uint32_t ulMultiplier = 0;
if( !ulMultiplier ) uuid_to_seed(0);
const uint32_t ulIncrement = 1UL;
/* Utility function to generate a pseudo random number. */
ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;
return( ( int ) ( ulNextRand ) & 0x7fffUL );
}
BaseType_t xApplicationGetRandomNumber( uint32_t * pulNumber )
{
*pulNumber = ( uint32_t ) uxRand();
return pdTRUE;
}
extern uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress,
uint16_t usSourcePort,
uint32_t ulDestinationAddress,
uint16_t usDestinationPort )
{
( void ) ulSourceAddress;
( void ) usSourcePort;
( void ) ulDestinationAddress;
( void ) usDestinationPort;
return ( uint32_t ) uxRand();
}
void vApplicationPingReplyHook( ePingReplyStatus_t eStatus,
uint16_t usIdentifier )
{
(void)eStatus;
(void)usIdentifier;
/* Provide a stub for this function. */
}
eDHCPCallbackAnswer_t xApplicationDHCPHook_Multi( eDHCPCallbackPhase_t eDHCPPhase,
struct xNetworkEndPoint * pxEndPoint,
IP_Address_t * pxIPAddress )
{
(void)eDHCPPhase;
(void)pxEndPoint;
(void)pxIPAddress;
/* Provide a stub for this function. */
return eDHCPContinue;
}
const char * pcApplicationHostnameHook( void )
{
/* This function will be called during the DHCP: the machine will be registered
* with an IP address plus this name. */
return "STM32H755ZI-Q-Labor";
}
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
static NetworkInterface_t xInterfaces[ 1 ];
static NetworkEndPoint_t xEndPoints[ 1 ];
extern NetworkInterface_t * pxSTM32_FillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface );
extern NetworkInterface_t * pxLoopback_FillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface );
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* USER CODE BEGIN Boot_Mode_Sequence_1 */
/*HW semaphore Clock enable*/
__HAL_RCC_HSEM_CLK_ENABLE();
/* Activate HSEM notification for Cortex-M4*/
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/*
Domain D2 goes to STOP mode (Cortex-M4 in deep-sleep) waiting for Cortex-M7 to
perform system initialization (system clock config, external memory configuration.. )
*/
HAL_PWREx_ClearPendingEvent();
HAL_PWREx_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFE, PWR_D2_DOMAIN);
/* Clear HSEM flag */
__HAL_HSEM_CLEAR_FLAG(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE END Boot_Mode_Sequence_1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
pxSTM32_FillInterfaceDescriptor(
1,
&( xInterfaces[ 0 ] )
);
/* Attach an endpoint to that interface. */
uint32_t ip4gen = uuid_to_ipv4_lla(0);
const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ] = { ( ip4gen >> 24 ) & 0xFF,
( ip4gen >> 16 ) & 0xFF, ( ip4gen >> 8 ) & 0xFF, ( ip4gen >> 0 ) & 0xFF };
const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ] = { 255, 255, 0, 0 };
const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ] = { 169, 254, 0, 1 };
const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ] = { 1, 1, 1, 1 };
uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] = { 0 };
uuid_to_mac(ucMACAddress, 0);
/* Attach an endpoint to that interface. */
FreeRTOS_FillEndPoint(
&( xInterfaces[ 0 ] ),
&( xEndPoints[ 0 ] ),
ucIPAddress,
ucNetMask,
ucGatewayAddress,
ucDNSServerAddress,
ucMACAddress
);
//switch off dhcp and directly use LLA address determined by the UUID
xEndPoints[ 0 ].bits.bWantDHCP = 0;
/* USER CODE END Init */
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_ETH_Init();
/* USER CODE BEGIN 2 */
IPC_ETH_CONSUMER_Init("eth_endpoint");
initialise_stdlib_abstraction();
FreeRTOS_IPInit_Multi();
vTaskStartScheduler();
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief ETH Initialization Function
* @param None
* @retval None
*/
static void MX_ETH_Init(void)
{
/* USER CODE BEGIN ETH_Init 0 */
#if 0
/* USER CODE END ETH_Init 0 */
static uint8_t MACAddr[6];
/* USER CODE BEGIN ETH_Init 1 */
/* USER CODE END ETH_Init 1 */
heth.Instance = ETH;
MACAddr[0] = 0x00;
MACAddr[1] = 0x80;
MACAddr[2] = 0xE1;
MACAddr[3] = 0x00;
MACAddr[4] = 0x00;
MACAddr[5] = 0x00;
heth.Init.MACAddr = &MACAddr[0];
heth.Init.MediaInterface = HAL_ETH_RMII_MODE;
heth.Init.TxDesc = DMATxDscrTab;
heth.Init.RxDesc = DMARxDscrTab;
heth.Init.RxBuffLen = 1536;
/* USER CODE BEGIN MACADDRESS */
/* USER CODE END MACADDRESS */
if (HAL_ETH_Init(&heth) != HAL_OK)
{
Error_Handler();
}
memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig));
TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD;
TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC;
TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT;
/* USER CODE BEGIN ETH_Init 2 */
#endif
/* USER CODE END ETH_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,869 @@
/**
* \file mvsyscall.c
* \brief Wrappers required to use newlib malloc-family within FreeRTOS.
* The syscalls for stdlib are implemented in a minimum way as well
*
* \par Overview
* Route FreeRTOS memory management functions to newlib's malloc family.
* Thus newlib and FreeRTOS share memory-management routines and memory pool,
* and all newlib's internal memory-management requirements are supported.
*
* \author Dave Nadler
* \author Thorsten Kimmel
* \date 20-August-2019
* \version 02-Dec-2021 implemented syscalls for stdlib
* \version 27-Jun-2020 Correct "FreeRTOS.h" capitalization, commentary
* \version 24-Jun-2020 commentary only
* \version 11-Sep-2019 malloc accounting, comments, newlib version check
*
* \see http://www.nadler.com/embedded/newlibAndFreeRTOS.html
* \see https://sourceware.org/newlib/libc.html#Reentrancy
* \see https://sourceware.org/newlib/libc.html#malloc
* \see https://sourceware.org/newlib/libc.html#index-_005f_005fenv_005flock
* \see https://sourceware.org/newlib/libc.html#index-_005f_005fmalloc_005flock
* \see https://sourceforge.net/p/freertos/feature-requests/72/
* \see http://www.billgatliff.com/newlib.html
* \see http://wiki.osdev.org/Porting_Newlib
* \see http://www.embecosm.com/appnotes/ean9/ean9-howto-newlib-1.0.html
*
*
* \copyright
* (c) Dave Nadler 2017-2020, All Rights Reserved.
* Web: http://www.nadler.com
* email: drn@nadler.com
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Use or redistributions of source code must retain the above copyright notice,
* this list of conditions, and the following disclaimer.
*
* - Use or redistributions of source code must retain ALL ORIGINAL COMMENTS, AND
* ANY CHANGES MUST BE DOCUMENTED, INCLUDING:
* - Reason for change (purpose)
* - Functional change
* - Date and author contact
*
* - Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*!
* Includes
*/
// ----------------------------------------------------------------------------
#include <sys/stat.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
#include <newlib.h>
#include <malloc.h>
#include <FreeRTOS.h>
/*!
* In case there is a FreeRTOS used for this application, we have to include
* additional dependencies which are used in memory wrappers
*/
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
# include "task.h"
# include "semphr.h"
#endif
// ----------------------------------------------------------------------------
/*!
* conditional check to make sure this syscall abstraction and the memory
* wrapper fits to the correct newlib / stdlib version
*/
// ----------------------------------------------------------------------------
#if (( __NEWLIB__ != 3) && ( __NEWLIB__ != 4 )) || ((__NEWLIB__ != 3) && (__NEWLIB_MINOR__ < 1)) || \
((__NEWLIB__ == 3) && (__NEWLIB_MINOR__ > 3) )
#warning "This wrapper was verified for newlib versions 3.1 - 3.3; please ensure newlib's external requirements for malloc-family are unchanged!"
#endif
// ----------------------------------------------------------------------------
/*!
* conditional check to make sure the correct reentrancy configuration has been
* set. Otherwise the stdlib calls could be lead to undefined behavior whenever
* a function is called simultaneous by more than one thread
*/
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
# if !defined(configUSE_NEWLIB_REENTRANT) || (configUSE_NEWLIB_REENTRANT != 1)
# error "#define configUSE_NEWLIB_REENTRANT 1 which is required for thread-safety of newlib sprintf, dtoa, strtok, etc..."
# endif
#endif
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
// ----------------------------------------------------------------------------
// The following functions are used to lock IRQs to make sure the newlib functions
// can be used in an IRQ as well, this is not working as expected and so we disable it
// for our platform so far, therefore we have to make sure the user can not enter newlib
// functions when running in ISR context
//! Disables interrupts (after saving prior state)
# define NEWLIB_FUNCS_INSIDE_ISR 0
# if defined(NEWLIB_FUNCS_INSIDE_ISR) && NEWLIB_FUNCS_INSIDE_ISR != 0
define DRN_ENTER_CRITICAL_SECTION(_usis) { _usis = taskENTER_CRITICAL_FROM_ISR(); }
# else
# define DRN_ENTER_CRITICAL_SECTION(_usis) do { int insideAnISR = xPortIsInsideInterrupt(); configASSERT( !insideAnISR ); } while(0)
# endif
//! Re-enables interrupts (unless already disabled prior taskENTER_CRITICAL)
# if defined(NEWLIB_FUNCS_INSIDE_ISR) && NEWLIB_FUNCS_INSIDE_ISR != 0
# define DRN_EXIT_CRITICAL_SECTION(_usis) { taskEXIT_CRITICAL_FROM_ISR(_usis); }
# else
# define DRN_EXIT_CRITICAL_SECTION(_usis)
# endif
// ----------------------------------------------------------------------------
# define __HeapBase _end
# define __HeapLimit _estack
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV
/*!
* The symbols __HeapBase and __HeapLimit are defined to read the
* heap parameters from symbols defined in the linker script. The
* define macros above are used to adapt these names to the name
* of the variable in the linker script. Both variables will be used
* later to allocate and manage memory of the heap and to detect a
* stack / heap crash...
*/
// ----------------------------------------------------------------------------
extern char __HeapBase, __HeapLimit;
int _write( int file, char* ptr, int len );
int _read( int file, char* ptr, int len );
/*!
* The following semaphore is used to prevent the stdout and stderr device
* to be accessed simultaneous while writing data. This is necessary because
* the stdlib itself is thread safe and has its own buffers for a thread but
* the access to the hardware must be locked as well
*/
// ----------------------------------------------------------------------------
static char memAlignmentAndSafetyBuffer[32] = {0};
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
static SemaphoreHandle_t stdioSemaphore;
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
static SemaphoreHandle_t mallocSemaphore;
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
static SemaphoreHandle_t envSemaphore;
#endif
#endif
/*!
* pointer to array of char* strings that define the current
* environment variables of the applications environment
*/
// ----------------------------------------------------------------------------
#define xstr(a) str(a)
#define str(a) #a
#define NEWLIB_ENV "STDLIB=newlib-" xstr(__NEWLIB__) "." xstr(__NEWLIB_MINOR__)
#ifdef NDEBUG
# define DEBUG_ENV "DEBUG_ENV=RELEASE"
#else
# define DEBUG_ENV "DEBUG_ENV=DEBUG"
#endif
#define GNUC_ENV "GNUC=" xstr(__GNUC__) "." xstr(__GNUC_MINOR__)
#define OS_VERSION_ENV "OSVERSION=" xstr(tskKERNEL_VERSION_MAJOR) "." xstr(tskKERNEL_VERSION_MINOR)
static char* __env[] = { "ARCH=ARM32", "MCU=STM32F746ZI", "PLATFORM=ARM_FW_PLAYGROUND", "OS=FreeRTOS", "USERNAME=STM32",
NEWLIB_ENV, OS_VERSION_ENV, GNUC_ENV, DEBUG_ENV, "BUILDTIME=" xstr(__TIME__), "BUILDDATE=" xstr(__DATE__),
NULL
};
char** environ = &__env[0];
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable stdout channel which can be used
* for debugging purposes in the application
* \param chr
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __stdout_put_char( int chr );
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable stdin channel which can be used
* for debugging purposes in the application
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) int __stdin_get_char( void )
{
return -1;
}
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable clock tick function which is used
* by the stdlib
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) unsigned long long __stdlib_get_system_clock_ticks( void )
{
#if defined(INC_FREERTOS_H)
return (unsigned long long)xTaskGetTickCount();
#else
return 0;
#endif
}
// ----------------------------------------------------------------------------
/*!
* \brief semihosting initialization function which should be called when _start
* is called. afterwards main would be called.
*/
// ----------------------------------------------------------------------------
void initialise_monitor_handles( void )
// ----------------------------------------------------------------------------
{
memAlignmentAndSafetyBuffer[0] = 1;
}
/*!
* \brief this function will be called after initialization of the .bss, .text,
* and .data segment of the application and while the stdlib begins to initialize
* its requirements. This is done by calling the __libc_init_array in _start.S routine
* before calling the main function. By tagging a function with the "constructor"
* attribute, the compiler will add the function pointer to this initialization list.
* \attention This is a GCC attribute. In case the application is compiled with another
* compiler, this attribute must be ported as well!
*/
// ----------------------------------------------------------------------------
__attribute__((constructor))
void initialise_stdlib_abstraction( void )
// ----------------------------------------------------------------------------
{
initialise_monitor_handles();
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
stdioSemaphore = xSemaphoreCreateRecursiveMutex();
if ( stdioSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
mallocSemaphore = xSemaphoreCreateRecursiveMutex();
if ( mallocSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
envSemaphore = xSemaphoreCreateRecursiveMutex();
if ( envSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
}
/*!
* \brief returns the process ID (PID) of the calling process.
* \attention we have no real OS and so we only return PID 1 because
* this is the only running process. Everything is in "kernel space" or
* "machine mode"
*/
// ----------------------------------------------------------------------------
int _getpid( void )
// ----------------------------------------------------------------------------
{
return 1;
}
/*!
* \brief The command kill sends the specified signal to the specified
* process.
* \attention we have no real OS and so we cannot kill our only running
* process with PID 1
*/
// ----------------------------------------------------------------------------
int _kill( int pid, int sig )
// ----------------------------------------------------------------------------
{
( void )pid;
( void )sig;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EINVAL;
}
errno = EINVAL;
return -1;
}
/*!
* \brief The command exit is used to stop the process or application
* \attention if the application has called exit, we do must not return
* from this function anymore
*/
// ----------------------------------------------------------------------------
__attribute__( ( noreturn ) )
void _exit ( int status )
// ----------------------------------------------------------------------------
{
_kill( status, -1 );
while ( 1 ) {}
}
/*!
* \brief attempts to read up to 'len' bytes from file descriptor 'file'
* into the buffer starting at 'ptr'.
* \note currently there is only support for stdin. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _read( int file, char* ptr, int len )
// ----------------------------------------------------------------------------
{
( void )file;
int DataIdx;
int resLen = 0;
if ( file == STDIN_FILENO )
{
for ( DataIdx = 0; DataIdx < len; )
{
int result = __stdin_get_char();
if ( result == EOF )
{
if ( resLen == 0 )
{
resLen = EOF;
}
break;
}
*ptr++ = ( char )result;
resLen++;
DataIdx++;
}
}
else
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EBADF;
}
errno = EBADF;
return -1;
}
return resLen;
}
/*!
* \brief attempts to write 'len' bytes from file descriptor 'file'
* out of the buffer starting at 'ptr'.
* \note currently there is only support for stdout and stderr. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _write( int file, char* ptr, int len )
// ----------------------------------------------------------------------------
{
( void )file;
int DataIdx, locked = 0;
if ( file == STDOUT_FILENO || file == STDERR_FILENO )
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( stdioSemaphore, -1 );
locked = 1;
}
#endif
if (file == STDERR_FILENO)
{
__stdout_put_char('\033');
__stdout_put_char('[');
__stdout_put_char('3');
__stdout_put_char('1');
__stdout_put_char('m');
}
for ( DataIdx = 0; DataIdx < len; DataIdx++ )
{
__stdout_put_char( ptr[DataIdx] );
}
if (file == STDERR_FILENO)
{
__stdout_put_char('\033');
__stdout_put_char('[');
__stdout_put_char('0');
__stdout_put_char('m');
}
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
if ( locked )
{
xSemaphoreGiveRecursive( stdioSemaphore );
}
#endif
return len;
}
else
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EBADF;
}
errno = EBADF;
return -1;
}
}
/*!
* \brief attempts to close a descriptor.
* \note currently there is no support for this function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _close( int file )
// ----------------------------------------------------------------------------
{
( void )file;
return -1;
}
/*!
* \brief These function returns information about a file, in the buffer
* pointed to by stat
* \note currently there is only support for stdin/out/err function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _fstat( int file, struct stat* st )
// ----------------------------------------------------------------------------
{
st->st_dev = file;
st->st_size = 0;
st->st_blocks = 0;
if ( file >= 1 && file <= 3 )
{
st->st_mode = S_IFCHR;
return 0;
}
else
{
st->st_mode = S_IFREG;
return -1;
}
}
/*!
* \brief checks wether a descriptor 'file' is a TTY device or not
* \note currently there is only support for stdin/out/err function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _isatty( int file )
// ----------------------------------------------------------------------------
{
// is stdin, stdout or stderror
if ( file >= 0 && file <= 2 )
{
return file;
}
return 0;
}
// ----------------------------------------------------------------------------
int _lseek( int file, int ptr, int dir )
// ----------------------------------------------------------------------------
{
( void )file;
( void )ptr;
( void )dir;
return 0;
}
// ----------------------------------------------------------------------------
int _open( char* path, int flags, ... )
// ----------------------------------------------------------------------------
{
( void )path;
( void )flags;
/* Pretend like we always fail */
return -1;
}
// ----------------------------------------------------------------------------
int _wait( int* status )
// ----------------------------------------------------------------------------
{
( void )status;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ECHILD;
}
errno = ECHILD;
return -1;
}
// ----------------------------------------------------------------------------
int _unlink( char* name )
// ----------------------------------------------------------------------------
{
( void )name;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOENT;
}
errno = ENOENT;
return -1;
}
// ----------------------------------------------------------------------------
int _times( struct tms* buf )
// ----------------------------------------------------------------------------
{
buf->tms_utime = buf->tms_cutime = 0; // we have no user space!
buf->tms_stime = buf->tms_cstime = __stdlib_get_system_clock_ticks( ); // everything runs in one process!
return 0;
}
// ----------------------------------------------------------------------------
int _stat( char* file, struct stat* st )
// ----------------------------------------------------------------------------
{
( void )file;
( void )st;
st->st_mode = S_IFCHR;
return 0;
}
// ----------------------------------------------------------------------------
int _link( char* old, char* new )
// ----------------------------------------------------------------------------
{
( void )old;
( void )new;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EMLINK;
}
errno = EMLINK;
return -1;
}
// ----------------------------------------------------------------------------
int _fork( void )
// ----------------------------------------------------------------------------
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EAGAIN;
}
errno = EAGAIN;
return -1;
}
// ----------------------------------------------------------------------------
int _execve( char* name, char** argv, char** env )
// ----------------------------------------------------------------------------
{
( void )env;
( void )name;
( void )argv;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOMEM;
}
errno = ENOMEM;
return -1;
}
// ================================================================================================
// External routines required by newlib's malloc (sbrk/_sbrk, __malloc_lock/unlock)
// ================================================================================================
#if !defined(INC_FREERTOS_H)
// ----------------------------------------------------------------------------
caddr_t _sbrk( int incr )
// ----------------------------------------------------------------------------
{
register char* stack_ptr asm( "sp" );
extern char end asm( "end" );
static char* heap_end;
char* prev_heap_end;
if ( heap_end == 0 )
{
heap_end = &end;
}
prev_heap_end = heap_end;
if ( heap_end + incr > stack_ptr )
{
// write(1, "Heap and stack collision\n", 25);
// abort();
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOMEM;
}
errno = ENOMEM;
return ( caddr_t ) -1;
}
heap_end += incr;
return ( caddr_t ) prev_heap_end;
}
#else
static int heapBytesRemaining;
static unsigned int stickyHeapBytesRemaining;
uint32_t TotalHeapSize;
// ----------------------------------------------------------------------------
static UBaseType_t malLock_uxSavedInterruptStatus;
// ----------------------------------------------------------------------------
void* _sbrk_r( struct _reent* pReent, int incr )
// ----------------------------------------------------------------------------
{
( void )malLock_uxSavedInterruptStatus;
( void )pReent;
( void )incr;
register char* stack_ptr asm( "sp" );
// make sure to calculate the correct heap size and bytes remaining at the first call!
if( TotalHeapSize == 0 )
{
TotalHeapSize = heapBytesRemaining = stickyHeapBytesRemaining
= ( int )( ( &__HeapLimit ) - ( &__HeapBase ) )
#ifdef configISR_STACK_SIZE_WORDS
- ( configISR_STACK_SIZE_WORDS * 4 )
#endif
;
};
static char* currentHeapEnd = &__HeapBase;
char* limit = ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED ) ?
stack_ptr : // Before scheduler is started, limit is stack pointer (risky!)
&__HeapLimit
#ifdef configISR_STACK_SIZE_WORDS
- ( configISR_STACK_SIZE_WORDS * 4 )
#endif
; // Once running, OK to reuse all remaining RAM except ISR stack (MSP) stack
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
if ( currentHeapEnd + incr > limit )
{
// Ooops, no more memory available...
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{
extern void vApplicationMallocFailedHook( void );
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
vApplicationMallocFailedHook();
}
#elif defined(configHARD_STOP_ON_MALLOC_FAILURE)
// If you want to alert debugger or halt...
// WARNING: brkpt instruction may prevent watchdog operation...
while( 1 )
{
__asm( "bkpt #0" );
}; // Stop in GUI as if at a breakpoint (if debugging, otherwise loop forever)
#else
// Default, if you prefer to believe your application will gracefully trap out-of-memory...
pReent->_errno = ENOMEM; // newlib's thread-specific errno
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
#endif
return ( char* ) -1; // the malloc-family routine that called sbrk will return 0
}
char* previousHeapEnd = currentHeapEnd;
currentHeapEnd += incr;
heapBytesRemaining -= incr;
// implement the statistical feature to provide the minimum free heap size feature
// of FreeRTOS statistics
if ( stickyHeapBytesRemaining > xPortGetFreeHeapSize() )
{
stickyHeapBytesRemaining = xPortGetFreeHeapSize();
}
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
return ( char* ) previousHeapEnd;
}
/*! \brief non-reentrant sbrk uses is actually reentrant by using current context
* because the current _reent structure is pointed to by global _impure_ptr
*/
// ----------------------------------------------------------------------------
void* sbrk( ptrdiff_t __incr )
// ----------------------------------------------------------------------------
{
return _sbrk_r( _impure_ptr, __incr );
}
//! _sbrk is a synonym for sbrk.
// ----------------------------------------------------------------------------
char* _sbrk( int incr )
// ----------------------------------------------------------------------------
{
return sbrk( incr );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __malloc_lock( struct _reent* r )
// ----------------------------------------------------------------------------
{
( void )r;
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( mallocSemaphore, -1 );
}
#endif
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __malloc_unlock( struct _reent* r )
// ----------------------------------------------------------------------------
{
( void )r;
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreGiveRecursive( mallocSemaphore );
}
#endif
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __env_lock( void )
// ----------------------------------------------------------------------------
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( envSemaphore, -1 );
}
#endif
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __env_unlock( void )
// ----------------------------------------------------------------------------
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreGiveRecursive( envSemaphore );
}
#endif
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
void* pvPortMalloc( size_t xSize )
// ----------------------------------------------------------------------------
{
void* p = malloc( xSize );
return p;
}
// ----------------------------------------------------------------------------
void vPortFree( void* pv )
// ----------------------------------------------------------------------------
{
free( pv );
}
// ----------------------------------------------------------------------------
size_t xPortGetFreeHeapSize( void )
// ----------------------------------------------------------------------------
{
static int lockGuard = 0;
if ( lockGuard != 0 ) return stickyHeapBytesRemaining;
lockGuard = 1;
struct mallinfo mi = mallinfo();
size_t result = mi.fordblks + heapBytesRemaining;
lockGuard = 0;
return result;
}
// ----------------------------------------------------------------------------
size_t xPortGetMinimumEverFreeHeapSize ( void )
// ----------------------------------------------------------------------------
{
return stickyHeapBytesRemaining;
}
//! No implementation needed, but stub provided in case application already calls vPortInitialiseBlocks
// ----------------------------------------------------------------------------
void vPortInitialiseBlocks( void )
// ----------------------------------------------------------------------------
{
return;
}
#endif
@@ -0,0 +1,207 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_hal_msp.c
* @brief This file provides code for the MSP Initialization
* and de-Initialization codes.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN Macro */
/* USER CODE END Macro */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* External functions --------------------------------------------------------*/
/* USER CODE BEGIN ExternalFunctions */
/* USER CODE END ExternalFunctions */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
/* System interrupt init*/
/* Peripheral interrupt init */
/* CM7_SEV_IRQn interrupt configuration */
HAL_NVIC_SetPriority(CM7_SEV_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(CM7_SEV_IRQn);
/* HSEM2_IRQn interrupt configuration */
HAL_NVIC_SetPriority(HSEM2_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(HSEM2_IRQn);
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
/**
* @brief ETH MSP Initialization
* This function configures the hardware resources used in this example
* @param heth: ETH handle pointer
* @retval None
*/
void HAL_ETH_MspInit(ETH_HandleTypeDef* heth)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(heth->Instance==ETH)
{
/* USER CODE BEGIN ETH_MspInit 0 */
/* USER CODE END ETH_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_ETH1MAC_CLK_ENABLE();
__HAL_RCC_ETH1TX_CLK_ENABLE();
__HAL_RCC_ETH1RX_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/**ETH GPIO Configuration
PC1 ------> ETH_MDC
PA1 ------> ETH_REF_CLK
PA2 ------> ETH_MDIO
PA7 ------> ETH_CRS_DV
PC4 ------> ETH_RXD0
PC5 ------> ETH_RXD1
PB13 ------> ETH_TXD1
PG11 ------> ETH_TX_EN
PG13 ------> ETH_TXD0
*/
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/* ETH interrupt Init */
HAL_NVIC_SetPriority(ETH_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(ETH_IRQn);
/* USER CODE BEGIN ETH_MspInit 1 */
/* USER CODE END ETH_MspInit 1 */
}
}
/**
* @brief ETH MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param heth: ETH handle pointer
* @retval None
*/
void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
{
if(heth->Instance==ETH)
{
/* USER CODE BEGIN ETH_MspDeInit 0 */
/* USER CODE END ETH_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_ETH1MAC_CLK_DISABLE();
__HAL_RCC_ETH1TX_CLK_DISABLE();
__HAL_RCC_ETH1RX_CLK_DISABLE();
/**ETH GPIO Configuration
PC1 ------> ETH_MDC
PA1 ------> ETH_REF_CLK
PA2 ------> ETH_MDIO
PA7 ------> ETH_CRS_DV
PC4 ------> ETH_RXD0
PC5 ------> ETH_RXD1
PB13 ------> ETH_TXD1
PG11 ------> ETH_TX_EN
PG13 ------> ETH_TXD0
*/
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5);
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7);
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13);
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11|GPIO_PIN_13);
/* ETH interrupt DeInit */
HAL_NVIC_DisableIRQ(ETH_IRQn);
/* USER CODE BEGIN ETH_MspDeInit 1 */
/* USER CODE END ETH_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
@@ -0,0 +1,259 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32h7xx_it.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
extern ETH_HandleTypeDef heth;
/* USER CODE BEGIN EV */
/* USER CODE END EV */
/******************************************************************************/
/* Cortex Processor Interruption and Exception Handlers */
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
{
}
/* USER CODE END NonMaskableInt_IRQn 1 */
}
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_HardFault_IRQn 0 */
/* USER CODE END W1_HardFault_IRQn 0 */
}
}
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
/* USER CODE END W1_MemoryManagement_IRQn 0 */
}
}
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_BusFault_IRQn 0 */
/* USER CODE END W1_BusFault_IRQn 0 */
}
}
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_UsageFault_IRQn 0 */
}
}
#if 0
/* USER CODE END W1_UsageFault_IRQn 0 */
}
}
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
/* USER CODE BEGIN SVCall_IRQn 0 */
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
/* USER CODE BEGIN DebugMonitor_IRQn 0 */
#endif
void DebugMon_Handler(void)
{
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
}
#if 0
/* USER CODE END DebugMonitor_IRQn 1 */
}
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
/* USER CODE BEGIN PendSV_IRQn 0 */
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */
#endif
void SysTick_Handler(void)
{
extern void xPortSysTickHandler( void );
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */
xPortSysTickHandler();
}
#if 0
// mask out the ETH_IRQ_Handler completely because it is provided
// by the free rtos tcp ip stack template in NetworkInterface.c
/* USER CODE END SysTick_IRQn 1 */
}
/******************************************************************************/
/* STM32H7xx Peripheral Interrupt Handlers */
/* Add here the Interrupt Handlers for the used peripherals. */
/* For the available peripheral interrupt handler names, */
/* please refer to the startup file (startup_stm32h7xx.s). */
/******************************************************************************/
/**
* @brief This function handles Ethernet global interrupt.
*/
void ETH_IRQHandler(void)
{
/* USER CODE BEGIN ETH_IRQn 0 */
/* USER CODE END ETH_IRQn 0 */
HAL_ETH_IRQHandler(&heth);
/* USER CODE BEGIN ETH_IRQn 1 */
/* USER CODE END ETH_IRQn 1 */
}
/**
* @brief This function handles CM7 send event interrupt for CM4.
*/
void CM7_SEV_IRQHandler(void)
{
/* USER CODE BEGIN CM7_SEV_IRQn 0 */
#endif
void CM7_SEV_IRQHandler(void)
{
/* USER CODE END CM7_SEV_IRQn 0 */
/* USER CODE BEGIN CM7_SEV_IRQn 1 */
/* USER CODE END CM7_SEV_IRQn 1 */
}
/**
* @brief This function handles HSEM2 global interrupt.
*/
void HSEM2_IRQHandler(void)
{
/* USER CODE BEGIN HSEM2_IRQn 0 */
/* USER CODE END HSEM2_IRQn 0 */
HAL_HSEM_IRQHandler();
/* USER CODE BEGIN HSEM2_IRQn 1 */
/* USER CODE END HSEM2_IRQn 1 */
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
@@ -0,0 +1,176 @@
/**
******************************************************************************
* @file syscalls.c
* @author Auto-generated by STM32CubeIDE
* @brief STM32CubeIDE Minimal System calls file
*
* For more information about which c-functions
* need which of these lowlevel functions
* please consult the Newlib libc-manual
******************************************************************************
* @attention
*
* Copyright (c) 2020-2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes */
#include <sys/stat.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
/* Variables */
extern int __io_putchar(int ch) __attribute__((weak));
extern int __io_getchar(void) __attribute__((weak));
char *__env[1] = { 0 };
char **environ = __env;
/* Functions */
void initialise_monitor_handles()
{
}
int _getpid(void)
{
return 1;
}
int _kill(int pid, int sig)
{
(void)pid;
(void)sig;
errno = EINVAL;
return -1;
}
void _exit (int status)
{
_kill(status, -1);
while (1) {} /* Make sure we hang here */
}
__attribute__((weak)) int _read(int file, char *ptr, int len)
{
(void)file;
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
*ptr++ = __io_getchar();
}
return len;
}
__attribute__((weak)) int _write(int file, char *ptr, int len)
{
(void)file;
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
__io_putchar(*ptr++);
}
return len;
}
int _close(int file)
{
(void)file;
return -1;
}
int _fstat(int file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _isatty(int file)
{
(void)file;
return 1;
}
int _lseek(int file, int ptr, int dir)
{
(void)file;
(void)ptr;
(void)dir;
return 0;
}
int _open(char *path, int flags, ...)
{
(void)path;
(void)flags;
/* Pretend like we always fail */
return -1;
}
int _wait(int *status)
{
(void)status;
errno = ECHILD;
return -1;
}
int _unlink(char *name)
{
(void)name;
errno = ENOENT;
return -1;
}
int _times(struct tms *buf)
{
(void)buf;
return -1;
}
int _stat(char *file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _link(char *old, char *new)
{
(void)old;
(void)new;
errno = EMLINK;
return -1;
}
int _fork(void)
{
errno = EAGAIN;
return -1;
}
int _execve(char *name, char **argv, char **env)
{
(void)name;
(void)argv;
(void)env;
errno = ENOMEM;
return -1;
}
@@ -0,0 +1,79 @@
/**
******************************************************************************
* @file sysmem.c
* @author Generated by STM32CubeIDE
* @brief STM32CubeIDE System Memory calls file
*
* For more information about which C functions
* need which of these lowlevel functions
* please consult the newlib libc manual
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes */
#include <errno.h>
#include <stdint.h>
/**
* Pointer to the current high watermark of the heap usage
*/
static uint8_t *__sbrk_heap_end = NULL;
/**
* @brief _sbrk() allocates memory to the newlib heap and is used by malloc
* and others from the C library
*
* @verbatim
* ############################################################################
* # .data # .bss # newlib heap # MSP stack #
* # # # # Reserved by _Min_Stack_Size #
* ############################################################################
* ^-- RAM start ^-- _end _estack, RAM end --^
* @endverbatim
*
* This implementation starts allocating at the '_end' linker symbol
* The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
* The implementation considers '_estack' linker symbol to be RAM end
* NOTE: If the MSP stack, at any point during execution, grows larger than the
* reserved size, please increase the '_Min_Stack_Size'.
*
* @param incr Memory size
* @return Pointer to allocated memory
*/
void *_sbrk(ptrdiff_t incr)
{
extern uint8_t _end; /* Symbol defined in the linker script */
extern uint8_t _estack; /* Symbol defined in the linker script */
extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
const uint8_t *max_heap = (uint8_t *)stack_limit;
uint8_t *prev_heap_end;
/* Initialize heap end at first call */
if (NULL == __sbrk_heap_end)
{
__sbrk_heap_end = &_end;
}
/* Protect heap from growing into the reserved MSP stack */
if (__sbrk_heap_end + incr > max_heap)
{
errno = ENOMEM;
return (void *)-1;
}
prev_heap_end = __sbrk_heap_end;
__sbrk_heap_end += incr;
return (void *)prev_heap_end;
}
@@ -0,0 +1,768 @@
/**
******************************************************************************
* @file startup_stm32h755xx.s
* @author MCD Application Team
* @brief STM32H755xx Devices vector table for GCC based toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
******************************************************************************
* @attention
*
* Copyright (c) 2019 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
.syntax unified
.cpu cortex-m7
.fpu softvfp
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
/* Call the clock system initialization function.*/
bl SystemInit
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss
FillZerobss:
str r3, [r2]
adds r2, r2, #4
LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bx lr
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******************************************************************************
*
* The minimal vector table for a Cortex M. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
*******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
/* External Interrupts */
.word WWDG_IRQHandler /* Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */
.word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
.word FLASH_IRQHandler /* FLASH */
.word RCC_IRQHandler /* RCC */
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
.word EXTI3_IRQHandler /* EXTI Line3 */
.word EXTI4_IRQHandler /* EXTI Line4 */
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
.word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */
.word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */
.word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */
.word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
.word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */
.word TIM1_UP_IRQHandler /* TIM1 Update interrupt */
.word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
.word TIM2_IRQHandler /* TIM2 */
.word TIM3_IRQHandler /* TIM3 */
.word TIM4_IRQHandler /* TIM4 */
.word I2C1_EV_IRQHandler /* I2C1 Event */
.word I2C1_ER_IRQHandler /* I2C1 Error */
.word I2C2_EV_IRQHandler /* I2C2 Event */
.word I2C2_ER_IRQHandler /* I2C2 Error */
.word SPI1_IRQHandler /* SPI1 */
.word SPI2_IRQHandler /* SPI2 */
.word USART1_IRQHandler /* USART1 */
.word USART2_IRQHandler /* USART2 */
.word USART3_IRQHandler /* USART3 */
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
.word 0 /* Reserved */
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
.word FMC_IRQHandler /* FMC */
.word SDMMC1_IRQHandler /* SDMMC1 */
.word TIM5_IRQHandler /* TIM5 */
.word SPI3_IRQHandler /* SPI3 */
.word UART4_IRQHandler /* UART4 */
.word UART5_IRQHandler /* UART5 */
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
.word TIM7_IRQHandler /* TIM7 */
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
.word ETH_IRQHandler /* Ethernet */
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
.word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt */
.word CM7_SEV_IRQHandler /* CM7 Send event interrupt for CM4 */
.word CM4_SEV_IRQHandler /* CM4 Send event interrupt for CM7 */
.word 0 /* Reserved */
.word 0 /* Reserved */
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
.word USART6_IRQHandler /* USART6 */
.word I2C3_EV_IRQHandler /* I2C3 event */
.word I2C3_ER_IRQHandler /* I2C3 error */
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
.word OTG_HS_IRQHandler /* USB OTG HS */
.word DCMI_IRQHandler /* DCMI */
.word CRYP_IRQHandler /* Crypto */
.word HASH_RNG_IRQHandler /* Hash and Rng */
.word FPU_IRQHandler /* FPU */
.word UART7_IRQHandler /* UART7 */
.word UART8_IRQHandler /* UART8 */
.word SPI4_IRQHandler /* SPI4 */
.word SPI5_IRQHandler /* SPI5 */
.word SPI6_IRQHandler /* SPI6 */
.word SAI1_IRQHandler /* SAI1 */
.word LTDC_IRQHandler /* LTDC */
.word LTDC_ER_IRQHandler /* LTDC error */
.word DMA2D_IRQHandler /* DMA2D */
.word SAI2_IRQHandler /* SAI2 */
.word QUADSPI_IRQHandler /* QUADSPI */
.word LPTIM1_IRQHandler /* LPTIM1 */
.word CEC_IRQHandler /* HDMI_CEC */
.word I2C4_EV_IRQHandler /* I2C4 Event */
.word I2C4_ER_IRQHandler /* I2C4 Error */
.word SPDIF_RX_IRQHandler /* SPDIF_RX */
.word OTG_FS_EP1_OUT_IRQHandler /* USB OTG FS End Point 1 Out */
.word OTG_FS_EP1_IN_IRQHandler /* USB OTG FS End Point 1 In */
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI */
.word OTG_FS_IRQHandler /* USB OTG FS */
.word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */
.word HRTIM1_Master_IRQHandler /* HRTIM Master Timer global Interrupt */
.word HRTIM1_TIMA_IRQHandler /* HRTIM Timer A global Interrupt */
.word HRTIM1_TIMB_IRQHandler /* HRTIM Timer B global Interrupt */
.word HRTIM1_TIMC_IRQHandler /* HRTIM Timer C global Interrupt */
.word HRTIM1_TIMD_IRQHandler /* HRTIM Timer D global Interrupt */
.word HRTIM1_TIME_IRQHandler /* HRTIM Timer E global Interrupt */
.word HRTIM1_FLT_IRQHandler /* HRTIM Fault global Interrupt */
.word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */
.word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */
.word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */
.word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */
.word SAI3_IRQHandler /* SAI3 global Interrupt */
.word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */
.word TIM15_IRQHandler /* TIM15 global Interrupt */
.word TIM16_IRQHandler /* TIM16 global Interrupt */
.word TIM17_IRQHandler /* TIM17 global Interrupt */
.word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */
.word MDIOS_IRQHandler /* MDIOS global Interrupt */
.word JPEG_IRQHandler /* JPEG global Interrupt */
.word MDMA_IRQHandler /* MDMA global Interrupt */
.word 0 /* Reserved */
.word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */
.word HSEM1_IRQHandler /* HSEM1 global Interrupt */
.word HSEM2_IRQHandler /* HSEM1 global Interrupt */
.word ADC3_IRQHandler /* ADC3 global Interrupt */
.word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */
.word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */
.word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */
.word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */
.word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */
.word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */
.word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */
.word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */
.word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */
.word COMP1_IRQHandler /* COMP1 global Interrupt */
.word LPTIM2_IRQHandler /* LP TIM2 global interrupt */
.word LPTIM3_IRQHandler /* LP TIM3 global interrupt */
.word LPTIM4_IRQHandler /* LP TIM4 global interrupt */
.word LPTIM5_IRQHandler /* LP TIM5 global interrupt */
.word LPUART1_IRQHandler /* LP UART1 interrupt */
.word WWDG_RST_IRQHandler /* Window Watchdog reset interrupt (exti_d2_wwdg_it, exti_d1_wwdg_it) */
.word CRS_IRQHandler /* Clock Recovery Global Interrupt */
.word ECC_IRQHandler /* ECC diagnostic Global Interrupt */
.word SAI4_IRQHandler /* SAI4 global interrupt */
.word 0 /* Reserved */
.word HOLD_CORE_IRQHandler /* Hold core interrupt */
.word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */
.size g_pfnVectors, .-g_pfnVectors
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******************************************************************************/
.weak NMI_Handler
.thumb_set NMI_Handler,Default_Handler
.weak HardFault_Handler
.thumb_set HardFault_Handler,Default_Handler
.weak MemManage_Handler
.thumb_set MemManage_Handler,Default_Handler
.weak BusFault_Handler
.thumb_set BusFault_Handler,Default_Handler
.weak UsageFault_Handler
.thumb_set UsageFault_Handler,Default_Handler
.weak SVC_Handler
.thumb_set SVC_Handler,Default_Handler
.weak DebugMon_Handler
.thumb_set DebugMon_Handler,Default_Handler
.weak PendSV_Handler
.thumb_set PendSV_Handler,Default_Handler
.weak SysTick_Handler
.thumb_set SysTick_Handler,Default_Handler
.weak WWDG_IRQHandler
.thumb_set WWDG_IRQHandler,Default_Handler
.weak PVD_AVD_IRQHandler
.thumb_set PVD_AVD_IRQHandler,Default_Handler
.weak TAMP_STAMP_IRQHandler
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
.weak RTC_WKUP_IRQHandler
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
.weak FLASH_IRQHandler
.thumb_set FLASH_IRQHandler,Default_Handler
.weak RCC_IRQHandler
.thumb_set RCC_IRQHandler,Default_Handler
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandler,Default_Handler
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandler,Default_Handler
.weak EXTI2_IRQHandler
.thumb_set EXTI2_IRQHandler,Default_Handler
.weak EXTI3_IRQHandler
.thumb_set EXTI3_IRQHandler,Default_Handler
.weak EXTI4_IRQHandler
.thumb_set EXTI4_IRQHandler,Default_Handler
.weak DMA1_Stream0_IRQHandler
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
.weak DMA1_Stream1_IRQHandler
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
.weak DMA1_Stream2_IRQHandler
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
.weak DMA1_Stream3_IRQHandler
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
.weak DMA1_Stream4_IRQHandler
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
.weak DMA1_Stream5_IRQHandler
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
.weak DMA1_Stream6_IRQHandler
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
.weak ADC_IRQHandler
.thumb_set ADC_IRQHandler,Default_Handler
.weak FDCAN1_IT0_IRQHandler
.thumb_set FDCAN1_IT0_IRQHandler,Default_Handler
.weak FDCAN2_IT0_IRQHandler
.thumb_set FDCAN2_IT0_IRQHandler,Default_Handler
.weak FDCAN1_IT1_IRQHandler
.thumb_set FDCAN1_IT1_IRQHandler,Default_Handler
.weak FDCAN2_IT1_IRQHandler
.thumb_set FDCAN2_IT1_IRQHandler,Default_Handler
.weak EXTI9_5_IRQHandler
.thumb_set EXTI9_5_IRQHandler,Default_Handler
.weak TIM1_BRK_IRQHandler
.thumb_set TIM1_BRK_IRQHandler,Default_Handler
.weak TIM1_UP_IRQHandler
.thumb_set TIM1_UP_IRQHandler,Default_Handler
.weak TIM1_TRG_COM_IRQHandler
.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
.weak TIM1_CC_IRQHandler
.thumb_set TIM1_CC_IRQHandler,Default_Handler
.weak TIM2_IRQHandler
.thumb_set TIM2_IRQHandler,Default_Handler
.weak TIM3_IRQHandler
.thumb_set TIM3_IRQHandler,Default_Handler
.weak TIM4_IRQHandler
.thumb_set TIM4_IRQHandler,Default_Handler
.weak I2C1_EV_IRQHandler
.thumb_set I2C1_EV_IRQHandler,Default_Handler
.weak I2C1_ER_IRQHandler
.thumb_set I2C1_ER_IRQHandler,Default_Handler
.weak I2C2_EV_IRQHandler
.thumb_set I2C2_EV_IRQHandler,Default_Handler
.weak I2C2_ER_IRQHandler
.thumb_set I2C2_ER_IRQHandler,Default_Handler
.weak SPI1_IRQHandler
.thumb_set SPI1_IRQHandler,Default_Handler
.weak SPI2_IRQHandler
.thumb_set SPI2_IRQHandler,Default_Handler
.weak USART1_IRQHandler
.thumb_set USART1_IRQHandler,Default_Handler
.weak USART2_IRQHandler
.thumb_set USART2_IRQHandler,Default_Handler
.weak USART3_IRQHandler
.thumb_set USART3_IRQHandler,Default_Handler
.weak EXTI15_10_IRQHandler
.thumb_set EXTI15_10_IRQHandler,Default_Handler
.weak RTC_Alarm_IRQHandler
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
.weak TIM8_BRK_TIM12_IRQHandler
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
.weak TIM8_UP_TIM13_IRQHandler
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
.weak TIM8_TRG_COM_TIM14_IRQHandler
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
.weak TIM8_CC_IRQHandler
.thumb_set TIM8_CC_IRQHandler,Default_Handler
.weak DMA1_Stream7_IRQHandler
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
.weak FMC_IRQHandler
.thumb_set FMC_IRQHandler,Default_Handler
.weak SDMMC1_IRQHandler
.thumb_set SDMMC1_IRQHandler,Default_Handler
.weak TIM5_IRQHandler
.thumb_set TIM5_IRQHandler,Default_Handler
.weak SPI3_IRQHandler
.thumb_set SPI3_IRQHandler,Default_Handler
.weak UART4_IRQHandler
.thumb_set UART4_IRQHandler,Default_Handler
.weak UART5_IRQHandler
.thumb_set UART5_IRQHandler,Default_Handler
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
.weak TIM7_IRQHandler
.thumb_set TIM7_IRQHandler,Default_Handler
.weak DMA2_Stream0_IRQHandler
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
.weak DMA2_Stream1_IRQHandler
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
.weak DMA2_Stream2_IRQHandler
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
.weak DMA2_Stream3_IRQHandler
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
.weak DMA2_Stream4_IRQHandler
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
.weak ETH_IRQHandler
.thumb_set ETH_IRQHandler,Default_Handler
.weak ETH_WKUP_IRQHandler
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
.weak FDCAN_CAL_IRQHandler
.thumb_set FDCAN_CAL_IRQHandler,Default_Handler
.weak CM7_SEV_IRQHandler
.thumb_set CM7_SEV_IRQHandler,Default_Handler
.weak CM4_SEV_IRQHandler
.thumb_set CM4_SEV_IRQHandler,Default_Handler
.weak DMA2_Stream5_IRQHandler
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
.weak DMA2_Stream6_IRQHandler
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
.weak DMA2_Stream7_IRQHandler
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
.weak USART6_IRQHandler
.thumb_set USART6_IRQHandler,Default_Handler
.weak I2C3_EV_IRQHandler
.thumb_set I2C3_EV_IRQHandler,Default_Handler
.weak I2C3_ER_IRQHandler
.thumb_set I2C3_ER_IRQHandler,Default_Handler
.weak OTG_HS_EP1_OUT_IRQHandler
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_HS_EP1_IN_IRQHandler
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_HS_WKUP_IRQHandler
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
.weak OTG_HS_IRQHandler
.thumb_set OTG_HS_IRQHandler,Default_Handler
.weak DCMI_IRQHandler
.thumb_set DCMI_IRQHandler,Default_Handler
.weak CRYP_IRQHandler
.thumb_set CRYP_IRQHandler,Default_Handler
.weak HASH_RNG_IRQHandler
.thumb_set HASH_RNG_IRQHandler,Default_Handler
.weak FPU_IRQHandler
.thumb_set FPU_IRQHandler,Default_Handler
.weak UART7_IRQHandler
.thumb_set UART7_IRQHandler,Default_Handler
.weak UART8_IRQHandler
.thumb_set UART8_IRQHandler,Default_Handler
.weak SPI4_IRQHandler
.thumb_set SPI4_IRQHandler,Default_Handler
.weak SPI5_IRQHandler
.thumb_set SPI5_IRQHandler,Default_Handler
.weak SPI6_IRQHandler
.thumb_set SPI6_IRQHandler,Default_Handler
.weak SAI1_IRQHandler
.thumb_set SAI1_IRQHandler,Default_Handler
.weak LTDC_IRQHandler
.thumb_set LTDC_IRQHandler,Default_Handler
.weak LTDC_ER_IRQHandler
.thumb_set LTDC_ER_IRQHandler,Default_Handler
.weak DMA2D_IRQHandler
.thumb_set DMA2D_IRQHandler,Default_Handler
.weak SAI2_IRQHandler
.thumb_set SAI2_IRQHandler,Default_Handler
.weak QUADSPI_IRQHandler
.thumb_set QUADSPI_IRQHandler,Default_Handler
.weak LPTIM1_IRQHandler
.thumb_set LPTIM1_IRQHandler,Default_Handler
.weak CEC_IRQHandler
.thumb_set CEC_IRQHandler,Default_Handler
.weak I2C4_EV_IRQHandler
.thumb_set I2C4_EV_IRQHandler,Default_Handler
.weak I2C4_ER_IRQHandler
.thumb_set I2C4_ER_IRQHandler,Default_Handler
.weak SPDIF_RX_IRQHandler
.thumb_set SPDIF_RX_IRQHandler,Default_Handler
.weak OTG_FS_EP1_OUT_IRQHandler
.thumb_set OTG_FS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_FS_EP1_IN_IRQHandler
.thumb_set OTG_FS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_FS_WKUP_IRQHandler
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
.weak OTG_FS_IRQHandler
.thumb_set OTG_FS_IRQHandler,Default_Handler
.weak DMAMUX1_OVR_IRQHandler
.thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler
.weak HRTIM1_Master_IRQHandler
.thumb_set HRTIM1_Master_IRQHandler,Default_Handler
.weak HRTIM1_TIMA_IRQHandler
.thumb_set HRTIM1_TIMA_IRQHandler,Default_Handler
.weak HRTIM1_TIMB_IRQHandler
.thumb_set HRTIM1_TIMB_IRQHandler,Default_Handler
.weak HRTIM1_TIMC_IRQHandler
.thumb_set HRTIM1_TIMC_IRQHandler,Default_Handler
.weak HRTIM1_TIMD_IRQHandler
.thumb_set HRTIM1_TIMD_IRQHandler,Default_Handler
.weak HRTIM1_TIME_IRQHandler
.thumb_set HRTIM1_TIME_IRQHandler,Default_Handler
.weak HRTIM1_FLT_IRQHandler
.thumb_set HRTIM1_FLT_IRQHandler,Default_Handler
.weak DFSDM1_FLT0_IRQHandler
.thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler
.weak DFSDM1_FLT1_IRQHandler
.thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler
.weak DFSDM1_FLT2_IRQHandler
.thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler
.weak DFSDM1_FLT3_IRQHandler
.thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler
.weak SAI3_IRQHandler
.thumb_set SAI3_IRQHandler,Default_Handler
.weak SWPMI1_IRQHandler
.thumb_set SWPMI1_IRQHandler,Default_Handler
.weak TIM15_IRQHandler
.thumb_set TIM15_IRQHandler,Default_Handler
.weak TIM16_IRQHandler
.thumb_set TIM16_IRQHandler,Default_Handler
.weak TIM17_IRQHandler
.thumb_set TIM17_IRQHandler,Default_Handler
.weak MDIOS_WKUP_IRQHandler
.thumb_set MDIOS_WKUP_IRQHandler,Default_Handler
.weak MDIOS_IRQHandler
.thumb_set MDIOS_IRQHandler,Default_Handler
.weak JPEG_IRQHandler
.thumb_set JPEG_IRQHandler,Default_Handler
.weak MDMA_IRQHandler
.thumb_set MDMA_IRQHandler,Default_Handler
.weak SDMMC2_IRQHandler
.thumb_set SDMMC2_IRQHandler,Default_Handler
.weak HSEM1_IRQHandler
.thumb_set HSEM1_IRQHandler,Default_Handler
.weak HSEM2_IRQHandler
.thumb_set HSEM2_IRQHandler,Default_Handler
.weak ADC3_IRQHandler
.thumb_set ADC3_IRQHandler,Default_Handler
.weak DMAMUX2_OVR_IRQHandler
.thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler
.weak BDMA_Channel0_IRQHandler
.thumb_set BDMA_Channel0_IRQHandler,Default_Handler
.weak BDMA_Channel1_IRQHandler
.thumb_set BDMA_Channel1_IRQHandler,Default_Handler
.weak BDMA_Channel2_IRQHandler
.thumb_set BDMA_Channel2_IRQHandler,Default_Handler
.weak BDMA_Channel3_IRQHandler
.thumb_set BDMA_Channel3_IRQHandler,Default_Handler
.weak BDMA_Channel4_IRQHandler
.thumb_set BDMA_Channel4_IRQHandler,Default_Handler
.weak BDMA_Channel5_IRQHandler
.thumb_set BDMA_Channel5_IRQHandler,Default_Handler
.weak BDMA_Channel6_IRQHandler
.thumb_set BDMA_Channel6_IRQHandler,Default_Handler
.weak BDMA_Channel7_IRQHandler
.thumb_set BDMA_Channel7_IRQHandler,Default_Handler
.weak COMP1_IRQHandler
.thumb_set COMP1_IRQHandler,Default_Handler
.weak LPTIM2_IRQHandler
.thumb_set LPTIM2_IRQHandler,Default_Handler
.weak LPTIM3_IRQHandler
.thumb_set LPTIM3_IRQHandler,Default_Handler
.weak LPTIM4_IRQHandler
.thumb_set LPTIM4_IRQHandler,Default_Handler
.weak LPTIM5_IRQHandler
.thumb_set LPTIM5_IRQHandler,Default_Handler
.weak LPUART1_IRQHandler
.thumb_set LPUART1_IRQHandler,Default_Handler
.weak WWDG_RST_IRQHandler
.thumb_set WWDG_RST_IRQHandler,Default_Handler
.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler
.weak ECC_IRQHandler
.thumb_set ECC_IRQHandler,Default_Handler
.weak SAI4_IRQHandler
.thumb_set SAI4_IRQHandler,Default_Handler
.weak HOLD_CORE_IRQHandler
.thumb_set HOLD_CORE_IRQHandler,Default_Handler
.weak WAKEUP_PIN_IRQHandler
.thumb_set WAKEUP_PIN_IRQHandler,Default_Handler
Whitespace-only changes.
+198
View File
@@ -0,0 +1,198 @@
##########################################################################################################################
# Author: Thorsten Kimmel
# Project: DHBW-Embedded-Systems-TES
##########################################################################################################################
# ------------------------------------------------
# Generic Makefile (based on gcc)
#
# ChangeLog :
# 2026-09-25 - first version
# ------------------------------------------------
######################################
# target
######################################
TARGET = Stepper-H7-CM4
FREERTOS_USE_NETWORK := true
MK_CORE := M4
LDFLAGS :=
CFLAGS :=
C_SOURCES :=
C_INCLUDES :=
ASM_SOURCES :=
C_DEFS :=
AS_DEFS :=
# cpu
CPU = -mcpu=cortex-m4
#######################################
# additional common includes
#######################################
include ../common.mk
######################################
# building variables
######################################
# debug build? 1 = -g, 2 = -g3
DEBUG = 2
# optimization
OPT = -O0
# stack size limit of single function (warning)
SLIMIT = 2048
#######################################
# paths
#######################################
# Build path
BUILD_DIR = build
######################################
# source
######################################
# C sources
C_SOURCES += Core/Src/main.c \
Core/Src/newlib_abs.c \
Core/Src/stm32h7xx_hal_msp.c \
Core/Src/stm32h7xx_it.c \
$(wildcard Core/Src/IPC/*.c) \
$(wildcard OPENAMP/*.c) \
# ASM sources
ASM_SOURCES += Core/Startup/startup_stm32h755zitx.s
#######################################
# CFLAGS
#######################################
# fpu
# NONE for Cortex-M0/M0+/M3
# float-abi
FPU = -mfpu=fpv5-d16
FLOAT-ABI = -mfloat-abi=hard
# mcu
MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
# macros for gcc
# AS defines
AS_DEFS +=
# C defines
C_DEFS += -DCORE_CM4 \
-DDEBUG \
-DVIRTIO_SLAVE_ONLY
# AS includes
AS_INCLUDES +=
# C includes
C_INCLUDES += -ICore/Inc \
-ICore/Inc/IPC \
-IOPENAMP
# compile gcc flags
ASFLAGS += $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -fstack-usage -Wstack-usage=$(SLIMIT) -Wno-unused-parameter -Wall -Wextra -Wundef -Wshadow -fno-common -fdata-sections -ffunction-sections
CFLAGS += $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -fstack-usage -Wstack-usage=$(SLIMIT) -Wno-unused-parameter -Wall -Wextra -Wundef -Wshadow -fno-common -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2
endif
ifeq ($(DEBUG), 2)
CFLAGS += -g3 -gdwarf-2
endif
ifeq ($(OS),Windows_NT)
EXEPOSTFIX = .exe
else
EXEPOSTFIX =
endif
#######################################
# LDFLAGS
#######################################
# link script
LDSCRIPT = STM32H755ZITX_FLASH.ld
# libraries
LIBS = -lc -lm -lnosys
LIBDIR =
# -specs=nano.specs
LDFLAGS += -lc -lrdimon -u _printf_float -Wa,-adhln -g $(MCU) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref,--gc-sections
# default action: build all
.PHONY: all
all: $(BUILD_DIR)/$(TARGET).elf #$(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin $(BUILD_DIR)/$(TARGET).S
#######################################
# build the application
#######################################
# list of objects
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
vpath %.c $(sort $(dir $(C_SOURCES)))
# list of ASM program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
vpath %.s $(sort $(dir $(ASM_SOURCES)))
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
@echo " $(MK_CORE)-CC $<"
@$(CC)$(EXEPOSTFIX) -c $(CFLAGS) -MMD -MP -MF"$(@:%.o=%.d)" $< -o $@
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
@echo " $(MK_CORE)-AS $<"
@$(AS)$(EXEPOSTFIX) -c $(CFLAGS) $< -o $@
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
@echo " $(MK_CORE)-ELF $(BUILD_DIR)/$(TARGET).elf"
@$(CC)$(EXEPOSTFIX) $(OBJECTS) $(LDFLAGS) -o $@
@$(SZ)$(EXEPOSTFIX) $@
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
@$(HEX)$(EXEPOSTFIX) $< $@
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
@$(BIN)$(EXEPOSTFIX) $< $@
$(BUILD_DIR)/%.S: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
$(OD)$(EXEPOSTFIX) -l -m armv7e-m --disassemble-all $< > $@
$(BUILD_DIR):
mkdir $@
#######################################
# clean up
#######################################
clean:
-rm -fR $(BUILD_DIR)
#######################################
# clean up
#######################################
setup:
@echo 'installation only works on linux and on linux subsystem for windows 10'
@sudo apt-get update
@sudo apt-get install clang clang-tools gcc-multilib g++-multilib build-essential gcc-arm-none-eabi binutils-arm-none-eabi -y
#######################################
# dependencies
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)
include ../sca.mk
# *** EOF ***
Whitespace-only changes.
@@ -0,0 +1,213 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : mbox_hsem.c
* Description : This file provides code for the configuration
* of the mailbox based on hardware semaphore.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "openamp/open_amp.h"
#include "stm32h7xx_hal.h"
#include "openamp_conf.h"
#include "mbox_hsem.h"
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
#define RX_NO_MSG 0
#define RX_NEW_MSG 1
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
static uint32_t msg_received = RX_NO_MSG;
/* Private functions ---------------------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
void HAL_HSEM_FreeCallback(uint32_t SemMask)
{
/* USER CODE BEGIN HSEM_FREE_CALLBACK */
/* USER CODE END HSEM_FREE_CALLBACK */
/* Prevent unused argument(s) compilation warning */
UNUSED(SemMask);
msg_received = RX_NEW_MSG;
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_HSEM_FREE_CALLBACK_CM7 */
/* USER CODE END PRE_HSEM_FREE_CALLBACK_CM7 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
/* USER CODE BEGIN POST_HSEM_FREE_CALLBACK_CM7 */
/* USER CODE END POST_HSEM_FREE_CALLBACK_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_HSEM_FREE_CALLBACK_CM4 */
/* USER CODE END PRE_HSEM_FREE_CALLBACK_CM4 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE BEGIN POST_HSEM_FREE_CALLBACK_CM4 */
/* USER CODE END POST_HSEM_FREE_CALLBACK_CM4 */
#endif
}
/**
* @brief Initialize MAILBOX with HSEM peripheral
* @param None
* @retval : Operation result
*/
int MAILBOX_Init(void)
{
/* USER CODE BEGIN MAILBOX_INIT */
/* USER CODE END MAILBOX_INIT */
__HAL_RCC_HSEM_CLK_ENABLE();
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_MAILBOX_INIT_CM7 */
/* USER CODE END PRE_MAILBOX_INIT_CM7 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
/* USER CODE BEGIN POST_MAILBOX_INIT_CM7 */
/* USER CODE END POST_MAILBOX_INIT_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN MAILBOX_INIT_CM4 */
/* USER CODE END MAILBOX_INIT_CM4 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE BEGIN POST_MAILBOX_INIT_CM4 */
/* USER CODE END POST_MAILBOX_INIT_CM4 */
#endif
return 0;
}
/**
* @brief Initialize MAILBOX with HSEM peripheral
* @param virtio device
* @retval : Operation result
*/
int MAILBOX_Poll(struct virtio_device *vdev)
{
/* If we got an interrupt, ask for the corresponding virtqueue processing */
if (msg_received == RX_NEW_MSG)
{
/* USER CODE BEGIN NEW_MSG */
/* USER CODE END NEW_MSG */
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_NEW_MSG_CM7 */
/* USER CODE END PRE_NEW_MSG_CM7 */
rproc_virtio_notified(vdev, VRING0_ID);
/* USER CODE BEGIN POST_NEW_MSG_CM7 */
/* USER CODE END POST_NEW_MSG_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_NEW_MSG_CM4 */
/* USER CODE END PRE_NEW_MSG_CM4 */
rproc_virtio_notified(vdev, VRING1_ID);
/* USER CODE BEGIN POST_NEW_MSG_CM4 */
/* USER CODE END POST_NEW_MSG_CM4 */
#endif
msg_received = RX_NO_MSG;
return 0;
}
/* USER CODE BEGIN NO_MSG */
/* USER CODE END NO_MSG */
return -EAGAIN;
}
/**
* @brief Callback function called by OpenAMP MW to notify message processing
* @param VRING id
* @retval Operation result
*/
int MAILBOX_Notify(void *priv, uint32_t id)
{
(void)priv;
(void)id;
/* USER CODE BEGIN MAILBOX_NOTIFY*/
/* USER CODE END MAILBOX_NOTIFY */
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_MAILBOX_NOTIFY_CM7 */
/* USER CODE END PRE_MAILBOX_NOTIFY_CM7 */
HAL_HSEM_FastTake(HSEM_ID_0);
HAL_HSEM_Release(HSEM_ID_0,0);
/* USER CODE BEGIN POST_MAILBOX_NOTIFY_CM7 */
/* USER CODE END POST_MAILBOX_NOTIFY_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_MAILBOX_NOTIFY_CM4 */
/* USER CODE END PRE_MAILBOX_NOTIFY_CM4 */
HAL_HSEM_FastTake(HSEM_ID_1);
HAL_HSEM_Release(HSEM_ID_1,0);
/* USER CODE BEGIN POST_MAILBOX_NOTIFY_CM4 */
/* USER CODE END POST_MAILBOX_NOTIFY_CM4 */
#endif
return 0;
}
@@ -0,0 +1,62 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file mabox_hsem.h
* @author MCD Application Team
* @brief header for mbox_hsem.c module
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef MBOX_HSEM_H_
#define MBOX_HSEM_H_
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#define HSEM_ID_0 0 /* CM7 to CM4 Notification */
#define HSEM_ID_1 1 /* CM4 to CM7 Notification */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
int MAILBOX_Notify(void *priv, uint32_t id);
int MAILBOX_Init(void);
int MAILBOX_Poll(struct virtio_device *vdev);
#endif /* MBOX_HSEM_H_ */
@@ -0,0 +1,282 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp.c
* @author MCD Application Team
* @brief Code for openamp applications
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
#include "openamp.h"
#include "rsc_table.h"
#include "metal/sys.h"
#include "metal/device.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
#define SHM_DEVICE_NAME "STM32_SHM"
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
static struct metal_io_region *shm_io;
static struct metal_io_region *rsc_io;
static struct shared_resource_table *rsc_table;
static struct rpmsg_virtio_shm_pool shpool;
static struct rpmsg_virtio_device rvdev;
static metal_phys_addr_t shm_physmap;
struct metal_device shm_device = {
.name = SHM_DEVICE_NAME,
.num_regions = 2,
.regions = {
{.virt = NULL}, /* shared memory */
{.virt = NULL}, /* rsc_table memory */
},
.node = { NULL },
.irq_num = 0,
.irq_info = NULL
};
/* Private functions ---------------------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
static int OPENAMP_shmem_init(int RPMsgRole)
{
int status = 0;
struct metal_device *device = NULL;
struct metal_init_params metal_params = METAL_INIT_DEFAULTS;
void* rsc_tab_addr = NULL;
int rsc_size = 0;
/* USER CODE BEGIN PRE_LIB_METAL_INIT */
/* USER CODE END PRE_LIB_METAL_INIT */
metal_init(&metal_params);
status = metal_register_generic_device(&shm_device);
if (status != 0) {
return status;
}
status = metal_device_open("generic", SHM_DEVICE_NAME, &device);
if (status != 0) {
return status;
}
shm_physmap = SHM_START_ADDRESS;
metal_io_init(&device->regions[0], (void *)SHM_START_ADDRESS, &shm_physmap,
SHM_SIZE, -1, 0, NULL);
/* USER CODE BEGIN PRE_SHM_IO_INIT */
/* USER CODE END PRE_SHM_IO_INIT */
shm_io = metal_device_io_region(device, 0);
if (shm_io == NULL) {
return -1;
}
/* USER CODE BEGIN POST_SHM_IO_INIT */
/* USER CODE END POST_SHM_IO_INIT */
/* Initialize resources table variables */
resource_table_init(RPMsgRole, &rsc_tab_addr, &rsc_size);
rsc_table = (struct shared_resource_table *)rsc_tab_addr;
if (!rsc_table)
{
return -1;
}
/* USER CODE BEGIN POST_RSC_TABLE_INIT */
/* USER CODE END POST_RSC_TABLE_INIT */
metal_io_init(&device->regions[1], rsc_table,
(metal_phys_addr_t *)rsc_table, rsc_size, -1U, 0, NULL);
/* USER CODE BEGIN POST_METAL_IO_INIT */
/* USER CODE END POST_METAL_IO_INIT */
rsc_io = metal_device_io_region(device, 1);
if (rsc_io == NULL) {
return -1;
}
/* USER CODE BEGIN POST_RSC_IO_INIT */
/* USER CODE END POST_RSC_IO_INIT */
return 0;
}
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb)
{
struct fw_rsc_vdev_vring *vring_rsc = NULL;
struct virtio_device *vdev = NULL;
int status = 0;
/* USER CODE BEGIN MAILBOX_Init */
/* USER CODE END MAIL_BOX_Init */
MAILBOX_Init();
/* Libmetal Initilalization */
status = OPENAMP_shmem_init(RPMsgRole);
if(status)
{
return status;
}
/* USER CODE BEGIN PRE_VIRTIO_INIT */
/* USER CODE END PRE_VIRTIO_INIT */
vdev = rproc_virtio_create_vdev(RPMsgRole, VDEV_ID, &rsc_table->vdev,
rsc_io, NULL, MAILBOX_Notify, NULL);
if (vdev == NULL)
{
return -1;
}
rproc_virtio_wait_remote_ready(vdev);
/* USER CODE BEGIN POST_VIRTIO_INIT */
/* USER CODE END POST_VIRTIO_INIT */
vring_rsc = &rsc_table->vring0;
status = rproc_virtio_init_vring(vdev, 0, vring_rsc->notifyid,
(void *)vring_rsc->da, shm_io,
vring_rsc->num, vring_rsc->align);
if (status != 0)
{
return status;
}
/* USER CODE BEGIN POST_VRING0_INIT */
/* USER CODE END POST_VRING0_INIT */
vring_rsc = &rsc_table->vring1;
status = rproc_virtio_init_vring(vdev, 1, vring_rsc->notifyid,
(void *)vring_rsc->da, shm_io,
vring_rsc->num, vring_rsc->align);
if (status != 0)
{
return status;
}
/* USER CODE BEGIN POST_VRING1_INIT */
/* USER CODE END POST_VRING1_INIT */
rpmsg_virtio_init_shm_pool(&shpool, (void *)VRING_BUFF_ADDRESS,
(size_t)SHM_SIZE);
rpmsg_init_vdev(&rvdev, vdev, ns_bind_cb, shm_io, &shpool);
/* USER CODE BEGIN POST_RPMSG_INIT */
/* USER CODE END POST_RPMSG_INIT */
return 0;
}
void OPENAMP_DeInit()
{
/* USER CODE BEGIN PRE_OPENAMP_DEINIT */
/* USER CODE END PRE_OPENAMP_DEINIT */
rpmsg_deinit_vdev(&rvdev);
metal_finish();
/* USER CODE BEGIN POST_OPENAMP_DEINIT */
/* USER CODE END POST_OPENAMP_DEINIT */
}
void OPENAMP_init_ept(struct rpmsg_endpoint *ept)
{
/* USER CODE BEGIN PRE_EP_INIT */
/* USER CODE END PRE_EP_INIT */
rpmsg_init_ept(ept, "", RPMSG_ADDR_ANY, RPMSG_ADDR_ANY, NULL, NULL);
/* USER CODE BEGIN POST_EP_INIT */
/* USER CODE END POST_EP_INIT */
}
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
uint32_t dest, rpmsg_ept_cb cb,
rpmsg_ns_unbind_cb unbind_cb)
{
int ret = 0;
/* USER CODE BEGIN PRE_EP_CREATE */
/* USER CODE END PRE_EP_CREATE */
ret = rpmsg_create_ept(ept, &rvdev.rdev, name, RPMSG_ADDR_ANY, dest, cb,
unbind_cb);
/* USER CODE BEGIN POST_EP_CREATE */
/* USER CODE END POST_EP_CREATE */
return ret;
}
void OPENAMP_check_for_message(void)
{
/* USER CODE BEGIN MSG_CHECK */
/* USER CODE END MSG_CHECK */
MAILBOX_Poll(rvdev.vdev);
}
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept)
{
/* USER CODE BEGIN EP_READY */
/* USER CODE END EP_READY */
while(!is_rpmsg_ept_ready(rp_ept))
{
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
MAILBOX_Poll(rvdev.vdev);
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
}
}
@@ -0,0 +1,87 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp.h
* @brief Header for openamp applications
* @author MCD Application Team
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __openamp_H
#define __openamp_H
#ifdef __cplusplus
extern "C" {
#endif
#include "openamp/open_amp.h"
#include "openamp_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#define OPENAMP_send rpmsg_send
#define OPENAMP_destroy_ept rpmsg_destroy_ept
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Initialize the openamp framework*/
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb);
/* Deinitialize the openamp framework*/
void OPENAMP_DeInit(void);
/* Initialize the endpoint struct*/
void OPENAMP_init_ept(struct rpmsg_endpoint *ept);
/* Create and register the endpoint */
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
uint32_t dest, rpmsg_ept_cb cb,
rpmsg_ns_unbind_cb unbind_cb);
/* Check for new rpmsg reception */
void OPENAMP_check_for_message(void);
/* Wait loop on endpoint ready ( message dest address is know)*/
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept);
#ifdef __cplusplus
}
#endif
#endif /*__openamp_H */
@@ -0,0 +1,247 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp_conf.h
* @author MCD Application Team
* @brief Configuration file for OpenAMP MW
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __OPENAMP_CONF__H__
#define __OPENAMP_CONF__H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#if defined (__LOG_TRACE_IO_) || defined(__LOG_UART_IO_)
#include "openamp_log.h"
#endif
/* ########################## Mailbox Interface Selection ############################## */
/**
* @brief This is the list of Mailbox interface to be used in the OpenAMP MW
* Please note that not all interfaces are supported by a STM32 device
*/
//#define MAILBOX_IPCC_IF_ENABLED
#define MAILBOX_HSEM_IF_ENABLED
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include Mailbox interface header file
*/
#ifdef MAILBOX_IPCC_IF_ENABLED
#include "mbox_ipcc.h"
#endif /* MAILBOX_IPCC_IF_ENABLED */
#ifdef MAILBOX_HSEM_IF_ENABLED
#include "mbox_hsem.h"
#endif /* MAILBOX_HSEM_IF_ENABLED */
/* ########################## Virtual Diver Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the OpenAMP Virtual driver module
* Please note that virtual driver are not supported on all stm32 families
*/
//#define VIRTUAL_UART_MODULE_ENABLED
//#define VIRTUAL_I2C_MODULE_ENABLED
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include Virtual Driver module's header file
*/
#ifdef VIRTUAL_UART_MODULE_ENABLED
#include "virt_uart.h"
#endif /* VIRTUAL_UART_MODULE_ENABLED */
#ifdef VIRTUAL_I2C_MODULE_ENABLED
#include "virt_i2c.h"
#endif /* VIRTUAL_I2C_MODULE_ENABLED */
/* ########################## Linux Master Selection ############################## */
/**
* @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
* In that case, the LINUX_RPROC_MASTER define is required
*/
//#define LINUX_RPROC_MASTER
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup OPENAMP_MW
* @{
*/
/** @defgroup OPENAMP_CONF OPENAMP_CONF
* @brief Configuration file for Openamp mw
* @{
*/
/** @defgroup OPENAMP_CONF_Exported_Variables OPENAMP_CONF_Exported_Variables
* @brief Public variables.
* @{
*/
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Defines OPENAMP_CONF_Exported_Defines
* @brief Defines for configuration of the Openamp mw
* @{
*/
#if defined (__ICCARM__)
/*
* For IAR, the .icf file should contain the following lines:
* define symbol __OPENAMP_region_start__ = BASE_ADDRESS; (0x38000400 for example)
* define symbol __OPENAMP_region_size__ = MEM_SIZE; (0xB000 as example)
*
* export symbol __OPENAMP_region_start__;
* export symbol __OPENAMP_region_size__;
*/
extern const uint32_t __OPENAMP_region_start__;
extern const uint8_t __OPENAMP_region_size__;
#define SHM_START_ADDRESS ((metal_phys_addr_t)&__OPENAMP_region_start__)
#define SHM_SIZE ((size_t)&__OPENAMP_region_size__)
#elif defined(__CC_ARM) || defined (__clang__)
/*
* For MDK-ARM, the scatter file .sct should contain the following line:
* LR_IROM1 .... {
* ...
* __OpenAMP_SHMEM__ 0x38000400 EMPTY 0x0000B000 {} ; Shared Memory area used by OpenAMP
* }
*
*/
extern unsigned int Image$$__OpenAMP_SHMEM__$$Base;
extern unsigned int Image$$__OpenAMP_SHMEM__$$ZI$$Length;
#define SHM_START_ADDRESS (unsigned int)&Image$$__OpenAMP_SHMEM__$$Base
#define SHM_SIZE ((size_t)&Image$$__OpenAMP_SHMEM__$$ZI$$Length)
#else
/*
* for GCC add the following content to the .ld file:
* MEMORY
* {
* ...
* OPEN_AMP_SHMEM (xrw) : ORIGIN = 0x38000400, LENGTH = 63K
* }
* __OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
* __OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
*
* using the LENGTH(OPEN_AMP_SHMEM) to set the SHM_SIZE lead to a crash thus we
* use the start and end address.
*/
extern int __OPENAMP_region_start__[]; /* defined by linker script */
extern int __OPENAMP_region_end__[]; /* defined by linker script */
#define SHM_START_ADDRESS ((metal_phys_addr_t)__OPENAMP_region_start__)
#define SHM_SIZE (size_t)((void *)__OPENAMP_region_end__ - (void *) __OPENAMP_region_start__)
#endif
#if defined LINUX_RPROC_MASTER
#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_ALIGNMENT 16 /* fixed to match with linux constraint */
#define VRING_NUM_BUFFS 16 /* number of rpmsg buffer */
#else
#define VRING_RX_ADDRESS SHM_START_ADDRESS
#define VRING_TX_ADDRESS (SHM_START_ADDRESS + 0x400)
#define VRING_BUFF_ADDRESS (SHM_START_ADDRESS + 0x800)
#define VRING_ALIGNMENT 4
#define VRING_NUM_BUFFS 4 /* number of rpmsg buffers */
#endif
/* Fixed parameter */
#define NUM_RESOURCE_ENTRIES 2
#define VRING_COUNT 2
#define VDEV_ID 0xFF
#define VRING0_ID 0 /* VRING0 ID (master to remote) fixed to 0 for linux compatibility*/
#define VRING1_ID 1 /* VRING1 ID (remote to master) fixed to 1 for linux compatibility */
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Macros OPENAMP_CONF_Exported_Macros
* @brief Aliases.
* @{
*/
/* DEBUG macros */
#if defined (__LOG_TRACE_IO_) || defined(__LOG_UART_IO_)
#define OPENAMP_log_dbg log_dbg
#define OPENAMP_log_info log_info
#define OPENAMP_log_warn log_warn
#define OPENAMP_log_err log_err
#else
#define OPENAMP_log_dbg(...)
#define OPENAMP_log_info(...)
#define OPENAMP_log_warn(...)
#define OPENAMP_log_err(...)
#endif
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Types OPENAMP_CONF_Exported_Types
* @brief Types.
* @{
*/
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_FunctionsPrototype OPENAMP_CONF_Exported_FunctionsPrototype
* @brief Declaration of public functions for OpenAMP mw.
* @{
*/
/* Exported functions -------------------------------------------------------*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __OPENAMP_CONF__H__ */
@@ -0,0 +1,175 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file rsc_table.c
* @author MCD Application Team
* @brief Resource table
*
* This file provides a default resource table requested by remote proc to
* load the elf file. It also allows to add debug trace using a shared buffer.
*
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/** @addtogroup RSC_TABLE
* @{
*/
/** @addtogroup resource_table
* @{
*/
/** @addtogroup resource_table_Private_Includes
* @{
*/
#if defined(__ICCARM__) || defined (__CC_ARM)
#include <stddef.h> /* needed for offsetof definition*/
#endif
#include "rsc_table.h"
#include "openamp/open_amp.h"
/**
* @}
*/
/** @addtogroup resource_table_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @addtogroup resource_table_Private_Defines
* @{
*/
/* Place resource table in special ELF section */
#if defined(__GNUC__)
#define __section_t(S) __attribute__((__section__(#S)))
#define __resource __section_t(.resource_table)
#endif
#if defined (LINUX_RPROC_MASTER)
#ifdef VIRTIO_MASTER_ONLY
#define CONST
#else
#define CONST const
#endif
#else
#define CONST
#endif
#define RPMSG_IPU_C0_FEATURES 1
#define VRING_COUNT 2
/* VirtIO rpmsg device id */
#define VIRTIO_ID_RPMSG_ 7
#if defined (__LOG_TRACE_IO_)
extern char system_log_buf[];
#endif
#if defined(__GNUC__)
#if !defined (__CC_ARM) && !defined (LINUX_RPROC_MASTER)
/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
* for the CM4 (see resource_table_init() below)
*/
volatile struct shared_resource_table __resource __attribute__((used)) resource_table;
#else
CONST struct shared_resource_table __resource __attribute__((used)) resource_table = {
#endif
#elif defined(__ICCARM__)
__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
#endif
#if defined(__ICCARM__) || defined (__CC_ARM) || defined (LINUX_RPROC_MASTER)
.version = 1,
#if defined (__LOG_TRACE_IO_)
.num = 2,
#else
.num = 1,
#endif
.reserved = {0, 0},
.offset = {
offsetof(struct shared_resource_table, vdev),
offsetof(struct shared_resource_table, cm_trace),
},
/* Virtio device entry */
.vdev= {
RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0,
VRING_COUNT, {0, 0},
},
/* Vring rsc entry - part of vdev rsc entry */
.vring0 = {VRING_TX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING0_ID, 0},
.vring1 = {VRING_RX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING1_ID, 0},
#if defined (__LOG_TRACE_IO_)
.cm_trace = {
RSC_TRACE,
(uint32_t)system_log_buf, SYSTEM_TRACE_BUF_SZ, 0, "cm4_log",
},
#endif
} ;
#endif
void resource_table_init(int RPMsgRole, void **table_ptr, int *length)
{
#if !defined (LINUX_RPROC_MASTER)
#if defined (__GNUC__) && ! defined (__CC_ARM)
#ifdef VIRTIO_MASTER_ONLY
/*
* Currently the GCC linker doesn't initialize the resource_table global variable at startup
* it is done here by the master application.
*/
memset(&resource_table, '\0', sizeof(struct shared_resource_table));
resource_table.num = 1;
resource_table.version = 1;
resource_table.offset[0] = offsetof(struct shared_resource_table, vdev);
resource_table.vring0.da = VRING_TX_ADDRESS;
resource_table.vring0.align = VRING_ALIGNMENT;
resource_table.vring0.num = VRING_NUM_BUFFS;
resource_table.vring0.notifyid = VRING0_ID;
resource_table.vring1.da = VRING_RX_ADDRESS;
resource_table.vring1.align = VRING_ALIGNMENT;
resource_table.vring1.num = VRING_NUM_BUFFS;
resource_table.vring1.notifyid = VRING1_ID;
resource_table.vdev.type = RSC_VDEV;
resource_table.vdev.id = VIRTIO_ID_RPMSG_;
resource_table.vdev.num_of_vrings=VRING_COUNT;
resource_table.vdev.dfeatures = RPMSG_IPU_C0_FEATURES;
#else
/* For the slave application let's wait until the resource_table is correctly initialized */
while(resource_table.vring1.da != VRING_RX_ADDRESS)
{
}
#endif
#endif
#endif
(void)RPMsgRole;
*length = sizeof(resource_table);
*table_ptr = (void *)&resource_table;
}
@@ -0,0 +1,74 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* This file populates resource table for BM remote
* for use by the Linux Master */
/* USER CODE END Header */
#ifndef RSC_TABLE_H_
#define RSC_TABLE_H_
#include "openamp/open_amp.h"
#include "openamp_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* Resource table for the given remote */
struct shared_resource_table {
unsigned int version;
unsigned int num;
unsigned int reserved[2];
unsigned int offset[NUM_RESOURCE_ENTRIES];
/* text carveout entry */
/* rpmsg vdev entry */
struct fw_rsc_vdev vdev;
struct fw_rsc_vdev_vring vring0;
struct fw_rsc_vdev_vring vring1;
struct fw_rsc_trace cm_trace;
};
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
void resource_table_init(int RPMsgRole, void **table_ptr, int *length);
#endif /* RSC_TABLE_H_ */
@@ -0,0 +1,210 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 1024Kbytes FLASH and 288Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is, without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** Copyright (c) 2024 STMicroelectronics.
** All rights reserved.
**
** This software is licensed under terms that can be found in the LICENSE file
** in the root directory of this software component.
** If no LICENSE file comes with this software, it is provided AS-IS.
**
****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 1024K
RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 288K
OPEN_AMP_RSCT (xrw) : ORIGIN = 0x38000000, LENGTH = 1K
OPEN_AMP_SHMEM (xrw) : ORIGIN = 0x38000400, LENGTH = 63K
}
__OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
__OPENAMP_region_size__ = LENGTH(OPEN_AMP_SHMEM);
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
/* Define output sections */
SECTIONS
{
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
/* The program code and other data goes into FLASH */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH
/* Constant data goes into FLASH */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} >FLASH
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >FLASH
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
} >FLASH
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
} >FLASH
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
} >FLASH
/* used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH
/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM
/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM
.RxDescripSection 0x10040000 (NOLOAD) :
{
*(.RxDescripSection)
*(.RxDescripSection*)
. = ALIGN(32);
} >RAM
.TxDescripSection 0x10040080 (NOLOAD) :
{
*(.TxDescripSection)
*(.TxDescripSection*)
. = ALIGN(32);
} >RAM
.EthBuffersSection 0x10040100 (NOLOAD) :
{
. = ALIGN(32);
*(.EthBuffersSection)
*(.EthBuffersSection*)
. = ALIGN(32);
} >RAM
.openamp_section (NOLOAD) :
{
. = ABSOLUTE(0x38000000);
*(.resource_table)
} > OPEN_AMP_RSCT AT >FLASH
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}
@@ -0,0 +1,177 @@
/*
******************************************************************************
**
** File : LinkerScript.ld (debug in RAM dedicated)
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 128Kbytes RAM_EXEC and 160Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is, without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** Copyright (c) 2024 STMicroelectronics.
** All rights reserved.
**
** This software is licensed under terms that can be found in the LICENSE file
** in the root directory of this software component.
** If no LICENSE file comes with this software, it is provided AS-IS.
**
****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
RAM_EXEC (rx) : ORIGIN = 0x10000000, LENGTH = 128K
RAM (xrw) : ORIGIN = 0x10020000, LENGTH = 160K
}
/* Define output sections */
SECTIONS
{
/* The startup code goes first into RAM_EXEC */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >RAM_EXEC
/* The program code and other data goes into RAM_EXEC */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >RAM_EXEC
/* Constant data goes into RAM_EXEC */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >RAM_EXEC
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} >RAM_EXEC
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >RAM_EXEC
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
} >RAM_EXEC
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
} >RAM_EXEC
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
} >RAM_EXEC
/* used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> RAM_EXEC
/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM
/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="3"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth__pwd_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_certif_path" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_check_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_key_path" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_pwd_file" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="true"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.incremental_flashing" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.ip_address_local" value="localhost"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.value" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.loadList" value="{&quot;fItems&quot;:[{&quot;fIsFromMainTab&quot;:true,&quot;fPath&quot;:&quot;Debug/stepper_h7_CM4.elf&quot;,&quot;fProjectName&quot;:&quot;stepper_h7_CM4&quot;,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:false,&quot;fLoadSymbols&quot;:true}]}"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.mode" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.multi_drop_enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.override_start_address_mode" value="default"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.port" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.remoteCommand" value="target remote"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.semihosting" value="Disabled"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startServer" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.divby0" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.unaligned" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.haltonexception" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swd_mode" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="61239"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="200000000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_max_halt_delay" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\HomeGit\dhbw\EmbSys\RealtimeProg\MCU_STM32_60h\stepper_h7\CM4\Debug\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="enable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="no_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="disable"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="freertos"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverAuto" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverPort" value="ARM_CM4F"/>
<intAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyPort" value="60002"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.st.stm32cube.ide.mcu.debug.stlink"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="61238"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/stepper_h7_CM4.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="stepper_h7_CM4"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.268958265"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/stepper_h7_CM4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&lt;gdbmemoryBlockExpression address=&quot;268713802&quot; label=&quot;0x10043f4a&quot;/&gt;&lt;/memoryBlockExpressionList&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration>
+282
View File
@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug">
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.828207417" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.437059308" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32H755ZITx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1019120318" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.2106454890" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.2011355551" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv5-d16" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.1587876848" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.263425911" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.68099515" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32H755ZITx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy | ../../Drivers/CMSIS/Device/ST/STM32H7xx/Include | ../../Drivers/CMSIS/Include | ../OPENAMP | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc | ../../Middlewares/Third_Party/OpenAMP/virtual_driver | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg || || || CORE_CM7 | USE_HAL_DRIVER | STM32H755xx | METAL_INTERNAL | METAL_MAX_DEVICE_REGIONS=2 | RPMSG_BUFFER_SIZE=512 | VIRTIO_MASTER_ONLY | NO_ATOMIC_64_SUPPORT | USE_PWR_DIRECT_SMPS_SUPPLY || || Core/Src | Drivers | OPENAMP | Core/Startup | Middlewares | Common || || || ${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || || ::" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1152195024" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="200" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.runtimelibrary_c.1180963885" name="Runtime library" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.runtimelibrary_c" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.runtimelibrary_c.value.nano_c" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat.1500291335" name="Use float with printf from newlib-nano (-u _printf_float)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoscanffloat.1674214688" name="Use float with scanf from newlib-nano (-u _scanf_float)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoscanffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.717110142" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/stepper_h7_CM7}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.189481723" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.2126497667" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1966634911" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.805168015" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="STM32H7"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.592520860" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.224848552" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1324252333" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.2043881931" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.214193850" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1895861679" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="CORE_CM7"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32H755xx"/>
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="STM32H7"/>
<listOptionValue builtIn="false" value="USE_PWR_DIRECT_SMPS_SUPPLY"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.2037184141" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../Core/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Device/ST/STM32H7xx/Include"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/virtual_driver"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.808169832" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.2065828702" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.1671765798" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.1568560894" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1783271802" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1797991315" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld}" valueType="string"/>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.2023946675" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.585275424" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.971959260" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.562656190" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.712023138" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1194938928" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.824238684" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.465756616" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1501101643" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.2134289215" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common"/>
<entry excluding="Src/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c|Src/FreeRTOS-Kernel/portable/MSVC-MingW|Src/FreeRTOS-Kernel/portable/Clang-Win32|Src/sysmem.c|Src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="FreeRTOS-Kernel/portable/GCC/ARM_CM4F|FreeRTOS-Kernel/portable/MemMang|FreeRTOS-Kernel/portable/MSVC-MingW|FreeRTOS-Kernel/portable/Clang-Win32" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="OPENAMP"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.1373760315" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1001657360" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32H755ZITx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1397933605" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.741203287" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.359026103" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv5-d16" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.1076148112" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.310363595" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.2076124675" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32H755ZITx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy | ../../Drivers/CMSIS/Device/ST/STM32H7xx/Include | ../../Drivers/CMSIS/Include | ../OPENAMP | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc | ../../Middlewares/Third_Party/OpenAMP/virtual_driver | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg || || || CORE_CM7 | USE_HAL_DRIVER | STM32H755xx | METAL_INTERNAL | METAL_MAX_DEVICE_REGIONS=2 | RPMSG_BUFFER_SIZE=512 | VIRTIO_MASTER_ONLY | NO_ATOMIC_64_SUPPORT | USE_PWR_DIRECT_SMPS_SUPPLY || || Core/Src | Drivers | OPENAMP | Core/Startup | Middlewares | Common || || || ${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || || ::" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1927445715" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="200" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.2125210637" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/stepper_h7_CM7}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.204738127" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.102363953" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1118615991" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.703145142" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1027009994" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="STM32H7"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.306020802" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1322353819" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.922859198" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.123357632" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.271711727" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORE_CM7"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32H755xx"/>
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="STM32H7"/>
<listOptionValue builtIn="false" value="USE_PWR_DIRECT_SMPS_SUPPLY"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.651899210" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../Core/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Device/ST/STM32H7xx/Include"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/virtual_driver"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.205497963" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.416390792" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.368073321" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.1864894896" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1593047652" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1538795186" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld}" valueType="string"/>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.626636160" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1721506507" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1372113103" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1540897759" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.2072802314" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.76942396" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1172432736" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.515511909" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.918200438" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.2101137517" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common"/>
<entry excluding="Src/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c|Src/FreeRTOS-Kernel/portable/MSVC-MingW|Src/FreeRTOS-Kernel/portable/Clang-Win32|Src/sysmem.c|Src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="FreeRTOS-Kernel/portable/GCC/ARM_CM4F|FreeRTOS-Kernel/portable/MemMang|FreeRTOS-Kernel/portable/MSVC-MingW|FreeRTOS-Kernel/portable/Clang-Win32" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="OPENAMP"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="stepper_h7_CM7.null.175305128" name="stepper_h7_CM7"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1322353819;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.205497963">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1324252333;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.808169832">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1098337479;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1098337479.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1007388151;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.2015107268">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1244977841;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1244977841.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.613622070;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1464540345">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1571300557;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1571300557.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.784689073;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.638121124">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1338325331;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1338325331.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1915944352;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1100093761">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
@@ -0,0 +1,3 @@
build
Debug
Release
+883
View File
@@ -0,0 +1,883 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>stepper_h7_CM7</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUMultiCpuProjectNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>Common</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/Common</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/LICENSE.txt</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/LICENSE.txt</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/CMakeLists.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/CMakeLists.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.json</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.json</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.xml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.xml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.yaml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.yaml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/GitHub-FreeRTOS-Kernel-Home.url</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/GitHub-FreeRTOS-Kernel-Home.url</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/History.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/History.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/LICENSE.md</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/LICENSE.md</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/MISRA.md</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/MISRA.md</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/Quick_Start_Guide.url</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/Quick_Start_Guide.url</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/README.md</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/README.md</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/croutine.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/croutine.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/cspell.config.yaml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/cspell.config.yaml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/event_groups.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/event_groups.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/list.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/list.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/manifest.yml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/manifest.yml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/queue.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/queue.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/stream_buffer.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/stream_buffer.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/tasks.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/tasks.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/timers.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/timers.c</locationURI>
</link>
<link>
<name>Core/Inc/Console/inc</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/conf</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/inc</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Core/Src/Console/Console.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibRTOSConsole/src/Console.c</locationURI>
</link>
<link>
<name>Core/Src/Spindle/Spindle.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibSpindle/src/Spindle.c</locationURI>
</link>
<link>
<name>Core/Src/Stepper/src</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/Legacy</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cortex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cortex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hsem.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hsem.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cortex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cortex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_crs.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_crs.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_gpio.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_gpio.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/CMakeLists.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/CMakeLists.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/FreeRTOS.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/FreeRTOS.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/StackMacros.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/StackMacros.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/atomic.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/atomic.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/croutine.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/croutine.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/deprecated_definitions.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/deprecated_definitions.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/event_groups.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/event_groups.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/list.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/list.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/message_buffer.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/message_buffer.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/mpu_prototypes.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/mpu_prototypes.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/mpu_syscall_numbers.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/mpu_syscall_numbers.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/mpu_wrappers.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/mpu_wrappers.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/newlib-freertos.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/newlib-freertos.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/picolibc-freertos.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/picolibc-freertos.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/portable.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/portable.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/projdefs.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/projdefs.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/queue.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/queue.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/semphr.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/semphr.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/stack_macros.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/stack_macros.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/stdint.readme</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/stdint.readme</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/stream_buffer.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/stream_buffer.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/task.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/task.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/timers.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/timers.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/CMakeLists.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/CMakeLists.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/Common</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MSVC-MingW</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/readme.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/readme.txt</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/condition.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/condition.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/device.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/device.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_device.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_device.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_init.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_init.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_io.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_io.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_shmem.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_shmem.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/init.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/init.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/io.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/io.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/log.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/log.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/remoteproc_virtio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/remoteproc/remoteproc_virtio.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/rpmsg.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg/rpmsg.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/rpmsg_virtio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg/rpmsg_virtio.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/shmem.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/shmem.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/sys.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/cortexm/sys.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/time.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/time.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/virtio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/virtio/virtio.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/virtqueue.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/virtio/virtqueue.c</locationURI>
</link>
<link>
<name>Core/Inc/Console/inc/Console.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibRTOSConsole/inc/Console.h</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/conf/LibL6474Config.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibL6474/conf/LibL6474Config.h</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/inc/LibL6474.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibL6474/inc/LibL6474.h</locationURI>
</link>
<link>
<name>Core/Src/Stepper/src/LibL6474x.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibL6474/src/LibL6474x.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/Common/mpu_wrappers_v2.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/Common/mpu_wrappers_v2.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM4F</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MSVC-MingW/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MSVC-MingW/port.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MSVC-MingW/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MSVC-MingW/portmacro.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/ReadMe.url</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/ReadMe.url</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_1.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_1.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_2.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_2.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_3.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_3.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_4.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_4.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_5.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_5.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/portmacro.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/ReadMe.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/ReadMe.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/port.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/portmacro.h</locationURI>
</link>
</linkedResources>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-864768909920134975" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-864768909920134975" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,4 @@
2F62501ED4689FB349E356AB974DBE57=D0CF62532CA6CA2614F74C6DE0AF97FD
8DF89ED150041C4CBC7CB9A9CAA90856=D0CF62532CA6CA2614F74C6DE0AF97FD
DC22A860405A8BF2F2C095E5B6529F12=7D1615E95F6C9AB913AD38D8A4D77383
eclipse.preferences.version=1
@@ -0,0 +1,18 @@
/*
* ConsoleConfig.h
*
* Created on: Dec 9, 2024
* Author: Thorsten
*/
#ifndef INC_CONSOLE_CONSOLECONFIG_H_
#define INC_CONSOLE_CONSOLECONFIG_H_
#define CONSOLE_USERNAME "STM32"
#define CONSOLE_USE_DYNAMIC_USERNAME 1
#define CONSOLE_LINE_HISTORY 8
#define CONSOLE_LINE_SIZE 120
#define CONSOLE_COMMAND_MAX_LENGTH 64
#define CONSOLE_HELP_MAX_LENGTH 512
#endif /* INC_CONSOLE_CONSOLECONFIG_H_ */
@@ -0,0 +1,141 @@
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* These parameters and more are described within the 'configuration' section of the
* FreeRTOS API documentation available on the FreeRTOS.org web site.
*
* See http://www.freertos.org/a00110.html
*----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* Section where include file can be added */
/* USER CODE END Includes */
/* Ensure definitions are only used by the compiler, and not by the assembler. */
#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
#include <stdint.h>
extern uint32_t SystemCoreClock;
/* USER CODE BEGIN 0 */
extern void configureTimerForRunTimeStats(void);
extern unsigned long getRunTimeCounterValue(void);
/* USER CODE END 0 */
#endif
#define configENABLE_FPU 1
#define configENABLE_MPU 0
#define configUSE_PREEMPTION 1
#define configSUPPORT_STATIC_ALLOCATION 0
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( SystemCoreClock )
#define configTICK_RATE_HZ ((TickType_t)1000)
#define configMAX_PRIORITIES ( 7 )
#define configMINIMAL_STACK_SIZE ((uint16_t)1024)
#define configTOTAL_HEAP_SIZE ((size_t)0x20000)
#define configMAX_TASK_NAME_LEN ( 16 )
#define configQUEUE_REGISTRY_SIZE ( 32 )
#define configGENERATE_RUN_TIME_STATS 1
#define configUSE_TRACE_FACILITY 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
#define configUSE_16_BIT_TICKS 0
#define configUSE_MUTEXES 1
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
#define configTIMER_QUEUE_LENGTH 8
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 4 )
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 1
#define configUSE_COUNTING_SEMAPHORES 1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */
/* Defaults to size_t for backward compatibility, but can be changed
if lengths will always be less than the number of bytes in a size_t. */
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* The following flag must be enabled only when using newlib */
#define configUSE_NEWLIB_REENTRANT 1
#define configCHECK_HANDLER_INSTALLATION 1
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_xTaskGetSchedulerState 1
/* Cortex-M specific definitions. */
#ifdef __NVIC_PRIO_BITS
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
#define configPRIO_BITS __NVIC_PRIO_BITS
#else
#define configPRIO_BITS 4
#endif
/* The lowest interrupt priority that can be used in a call to a "set priority"
function. */
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
/* The highest interrupt priority that can be used by any interrupt service
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
/* Interrupt priorities used by the kernel port layer itself. These are generic
to all Cortex-M ports, and do not rely on any particular library functions. */
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
/* USER CODE BEGIN 1 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine );
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); vAssertCalled( __FILE__, __LINE__);}
/* USER CODE END 1 */
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
/* IMPORTANT: This define is commented when used with STM32Cube firmware, when the timebase source is SysTick,
to prevent overwriting SysTick_Handler defined within STM32Cube HAL */
//#define xPortSysTickHandler SysTick_Handler
/* USER CODE BEGIN 2 */
/* Definitions needed when configGENERATE_RUN_TIME_STATS is on */
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() //SetupRunTimeStatsTimer
#define portGET_RUN_TIME_COUNTER_VALUE() (xTaskGetTickCount())//GetHighFrequencyTickValue
#define configISR_STACK_SIZE_WORDS 4096
#define configUSE_NEWLIB_REENTRANT 1
/* USER CODE END 2 */
/* USER CODE BEGIN Defines */
#define configAPPLICATION_ALLOCATED_HEAP 1
#define configRECORD_STACK_HIGH_ADDRESS 1 /* 1: record stack high address for the debugger, 0: do not record stack high address */
/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
/* USER CODE END Defines */
#endif /* FREERTOS_CONFIG_H */
@@ -0,0 +1,101 @@
/*
* ipc_eth_producer.h
*
* Created on: 12.08.2026
* Author: Thorsten
*/
#ifndef INC_IPC_IPC_ETH_PRODUCER_H_
#define INC_IPC_IPC_ETH_PRODUCER_H_
//---------------------------------------------------------------------------------------------------------------------
#define IPC_PKT_HEADERLEN (20 )
#define IPC_PKT_CONTROL_TYPE (0xDEADBEEF )
#define IPC_PKT_MAXSIZE (RPMSG_BUFFER_SIZE-8*sizeof(void*)-IPC_PKT_HEADERLEN)
#define IPC_CTRLREMOTE_SPINDLE_START (0xA0 )
#define IPC_CTRLREMOTE_SPINDLE_STOP (0xA1 )
#define IPC_CTRLREMOTE_STEP_RESET (0xA2 )
#define IPC_CTRLREMOTE_STEP_REF (0xA3 )
#define IPC_CTRLREMOTE_STEP_ON (0xA4 )
#define IPC_CTRLREMOTE_STEP_OFF (0xA5 )
#define IPC_CTRLREMOTE_STEP_MOVE (0xA6 )
#define IPC_CTRLREMOTE_MAX_LENGTH (20 )
//---------------------------------------------------------------------------------------------------------------------
typedef struct ipc_eth_packet
//---------------------------------------------------------------------------------------------------------------------
{
unsigned int magic;
unsigned int type;
unsigned int length;
unsigned int seqID;
int result;
char payload[IPC_PKT_MAXSIZE];
} __attribute__((packed)) ipc_eth_packet_t;
//---------------------------------------------------------------------------------------------------------------------
typedef struct IPC_ETH_PRODUCER_Context *IPC_ETH_PRODUCER_Context_t;
//---------------------------------------------------------------------------------------------------------------------
typedef struct IPC_ETH_PRODUCER_Handle *IPC_ETH_PRODUCER_Handle_t;
struct IPC_ETH_PRODUCER_Handle
//---------------------------------------------------------------------------------------------------------------------
{
IPC_ETH_PRODUCER_Context_t priv;
struct
{
void* rxCtrlPriv;
void (*rxCtrlCallback)(IPC_ETH_PRODUCER_Handle_t, ipc_eth_packet_t*, void*);
void (*statusReqCallback)(IPC_ETH_PRODUCER_Handle_t, void*[3]);
void* statusReqPriv[3];
} callbacks;
};
/*!
* The IPC_ETH_PRODUCER_Init function is used to create the OpenAMP endpoints and to manage the IPC and protocol stuff to
* forward Ethernet packets to report current status of the system to a network application.
*
* The return value of IPC_ETH_PRODUCER_Init is a null pointer in case an error occured or a pointer of type IPC_ETH_PRODUCER_Handle_t.
*
* param endpoint is the endpoint name which has to fit the remote endpoint name exactly
*
* ATTENTION: This function is not locked or guarded and therefore its never thread safe when calling from two different threads
* at the same or nearly the same time while no instance has been created before! One pointer and its ressources could be lost
* which leads to a memory leak and/or to OpenAMP registration issues at runtime!
*/
IPC_ETH_PRODUCER_Handle_t IPC_ETH_PRODUCER_Init(const char *endpoint);
/*!
* The IPC_ETH_PRODUCER_GetIPAddress function is used to read back the current IP address of the system and can be used
* to determine whether a vital link is present or not
*
* The return value of IPC_ETH_PRODUCER_GetIPAddress is non-zero in case an error occured or 0 on success.
*
* param h is the handle of the IPC Controller which has been created before by calling IPC_ETH_PRODUCER_Init once
* param ipv4 is the current IPv4 address of the ETH-Stack on remote side and can be 0.0.0.0 = 0x00000000
* param subnet is the current subnet masks of the ETH-Stack on remote side and can be 0.0.0.0 = 0x00000000
*/
int IPC_ETH_PRODUCER_GetIPAddress(IPC_ETH_PRODUCER_Handle_t h, uint32_t *ipv4, uint32_t *subnet);
/*!
* The IPC_ETH_PRODUCER_SendPaket function is used to send data from the application to the remote network stack within the multi
* processor system. the size and a pointer to tthe raw buffer must be provided. The packet is encapsulated by an IP and UDP frame,
* The port and sender IP can not be changed and are managed by the remote network stack
*
* The return value of IPC_ETH_PRODUCER_GetIPAddress is non-zero in case an error occured or 0 on success.
*
* param h is the handle of the IPC Controller which has been created before by calling IPC_ETH_PRODUCER_Init once
* param buff is the raw data buffer pointer of the network packet
* param size is the number of bytes of the packet
*/
int IPC_ETH_PRODUCER_SendPaket(IPC_ETH_PRODUCER_Handle_t h, void* buff, int size);
#endif /* INC_IPC_IPC_ETH_PRODUCER_H_ */
Whitespace-only changes.
@@ -0,0 +1,16 @@
/*
* LibL6474Config.h
*
* Created on: Dec 2, 2024
* Author: Thorsten
*/
#ifndef INC_LIBL6474_CONFIG_H_
#define INC_LIBL6474_CONFIG_H_ INC_LIBL6474_CONFIG_H_
#define LIBL6474_STEP_ASYNC 0
#define LIBL6474_HAS_LOCKING 0
#define LIBL6474_DISABLE_OCD 0
#define LIBL6474_HAS_FLAG 0
#endif /* INC_LIBL6474_CONFIG_H_ */
@@ -0,0 +1,115 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define SPINDLE_ENA_L_Pin GPIO_PIN_6
#define SPINDLE_ENA_L_GPIO_Port GPIOE
#define USR_BUTTON_Pin GPIO_PIN_13
#define USR_BUTTON_GPIO_Port GPIOC
#define SPINDLE_SI_R_Pin GPIO_PIN_0
#define SPINDLE_SI_R_GPIO_Port GPIOA
#define STEP_SPI_SCK_Pin GPIO_PIN_5
#define STEP_SPI_SCK_GPIO_Port GPIOA
#define STEP_SPI_MISO_Pin GPIO_PIN_6
#define STEP_SPI_MISO_GPIO_Port GPIOA
#define LED_GREEN_Pin GPIO_PIN_0
#define LED_GREEN_GPIO_Port GPIOB
#define SPINDLE_ENA_R_Pin GPIO_PIN_15
#define SPINDLE_ENA_R_GPIO_Port GPIOE
#define SPINDLE_PWM_L_Pin GPIO_PIN_10
#define SPINDLE_PWM_L_GPIO_Port GPIOB
#define SPINDLE_PWM_R_Pin GPIO_PIN_11
#define SPINDLE_PWM_R_GPIO_Port GPIOB
#define LED_RED_Pin GPIO_PIN_14
#define LED_RED_GPIO_Port GPIOB
#define DEBUG_UART_TX_Pin GPIO_PIN_8
#define DEBUG_UART_TX_GPIO_Port GPIOD
#define DEBUG_UART_RX_Pin GPIO_PIN_9
#define DEBUG_UART_RX_GPIO_Port GPIOD
#define STEP_SPI_CS_Pin GPIO_PIN_14
#define STEP_SPI_CS_GPIO_Port GPIOD
#define STEP_PULSE_Pin GPIO_PIN_15
#define STEP_PULSE_GPIO_Port GPIOD
#define STEP_RSTN_Pin GPIO_PIN_9
#define STEP_RSTN_GPIO_Port GPIOG
#define STEP_DIR_Pin GPIO_PIN_12
#define STEP_DIR_GPIO_Port GPIOG
#define STEP_FLAG_Pin GPIO_PIN_14
#define STEP_FLAG_GPIO_Port GPIOG
#define STEP_SPI_MOSI_Pin GPIO_PIN_5
#define STEP_SPI_MOSI_GPIO_Port GPIOB
#define REFERENCE_MARK_Pin GPIO_PIN_8
#define REFERENCE_MARK_GPIO_Port GPIOB
#define LIMIT_SWITCH_Pin GPIO_PIN_9
#define LIMIT_SWITCH_GPIO_Port GPIOB
#define SPINDLE_SI_L_Pin GPIO_PIN_0
#define SPINDLE_SI_L_GPIO_Port GPIOE
#define LED_YELLOW_Pin GPIO_PIN_1
#define LED_YELLOW_GPIO_Port GPIOE
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -0,0 +1,514 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_hal_conf.h
* @author MCD Application Team
* @brief HAL configuration file.
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32H7xx_HAL_CONF_H
#define STM32H7xx_HAL_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* ########################## Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the HAL driver
*/
#define HAL_MODULE_ENABLED
/* #define HAL_ADC_MODULE_ENABLED */
/* #define HAL_FDCAN_MODULE_ENABLED */
/* #define HAL_FMAC_MODULE_ENABLED */
/* #define HAL_CEC_MODULE_ENABLED */
/* #define HAL_COMP_MODULE_ENABLED */
/* #define HAL_CORDIC_MODULE_ENABLED */
/* #define HAL_CRC_MODULE_ENABLED */
/* #define HAL_CRYP_MODULE_ENABLED */
/* #define HAL_DAC_MODULE_ENABLED */
/* #define HAL_DCMI_MODULE_ENABLED */
/* #define HAL_DMA2D_MODULE_ENABLED */
/* #define HAL_ETH_MODULE_ENABLED */
/* #define HAL_ETH_LEGACY_MODULE_ENABLED */
/* #define HAL_NAND_MODULE_ENABLED */
/* #define HAL_NOR_MODULE_ENABLED */
/* #define HAL_OTFDEC_MODULE_ENABLED */
/* #define HAL_SRAM_MODULE_ENABLED */
/* #define HAL_SDRAM_MODULE_ENABLED */
/* #define HAL_HASH_MODULE_ENABLED */
/* #define HAL_HRTIM_MODULE_ENABLED */
/* #define HAL_HSEM_MODULE_ENABLED */
/* #define HAL_GFXMMU_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_OPAMP_MODULE_ENABLED */
/* #define HAL_OSPI_MODULE_ENABLED */
/* #define HAL_I2S_MODULE_ENABLED */
/* #define HAL_SMBUS_MODULE_ENABLED */
/* #define HAL_IWDG_MODULE_ENABLED */
/* #define HAL_LPTIM_MODULE_ENABLED */
/* #define HAL_LTDC_MODULE_ENABLED */
/* #define HAL_QSPI_MODULE_ENABLED */
/* #define HAL_RAMECC_MODULE_ENABLED */
/* #define HAL_RNG_MODULE_ENABLED */
/* #define HAL_RTC_MODULE_ENABLED */
/* #define HAL_SAI_MODULE_ENABLED */
/* #define HAL_SD_MODULE_ENABLED */
/* #define HAL_MMC_MODULE_ENABLED */
/* #define HAL_SPDIFRX_MODULE_ENABLED */
#define HAL_SPI_MODULE_ENABLED
/* #define HAL_SWPMI_MODULE_ENABLED */
#define HAL_TIM_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
/* #define HAL_USART_MODULE_ENABLED */
/* #define HAL_IRDA_MODULE_ENABLED */
/* #define HAL_SMARTCARD_MODULE_ENABLED */
/* #define HAL_WWDG_MODULE_ENABLED */
/* #define HAL_PCD_MODULE_ENABLED */
/* #define HAL_HCD_MODULE_ENABLED */
/* #define HAL_DFSDM_MODULE_ENABLED */
/* #define HAL_DSI_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_MDIOS_MODULE_ENABLED */
/* #define HAL_PSSI_MODULE_ENABLED */
/* #define HAL_DTS_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED
#define HAL_MDMA_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
#define HAL_HSEM_MODULE_ENABLED
/* ########################## Oscillator Values adaptation ####################*/
/**
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSE is used as system clock source, directly or through the PLL).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE (8000000UL) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */
#endif /* HSE_VALUE */
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT (100UL) /*!< Time out for HSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */
/**
* @brief Internal oscillator (CSI) default value.
* This value is the default CSI value after Reset.
*/
#if !defined (CSI_VALUE)
#define CSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/
#endif /* CSI_VALUE */
/**
* @brief Internal High Speed oscillator (HSI) value.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSI is used as system clock source, directly or through the PLL).
*/
#if !defined (HSI_VALUE)
#define HSI_VALUE (64000000UL) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */
/**
* @brief External Low Speed oscillator (LSE) value.
* This value is used by the UART, RTC HAL module to compute the system frequency
*/
#if !defined (LSE_VALUE)
#define LSE_VALUE (32768UL) /*!< Value of the External oscillator in Hz*/
#endif /* LSE_VALUE */
#if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */
#endif /* LSE_STARTUP_TIMEOUT */
#if !defined (LSI_VALUE)
#define LSI_VALUE (32000UL) /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature.*/
/**
* @brief External clock source for I2S peripheral
* This value is used by the I2S HAL module to compute the I2S clock source
* frequency, this source is inserted directly through I2S_CKIN pad.
*/
#if !defined (EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE 12288000UL /*!< Value of the External clock in Hz*/
#endif /* EXTERNAL_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE,
=== you can define the HSE value in your toolchain compiler preprocessor. */
/* ########################### System Configuration ######################### */
/**
* @brief This is the HAL system configuration section
*/
#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY (15UL) /*!< tick interrupt priority */
#define USE_RTOS 0
#define USE_SD_TRANSCEIVER 0U /*!< use uSD Transceiver */
#define USE_SPI_CRC 0U /*!< use CRC in SPI */
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */
#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U /* CORDIC register callback disabled */
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
#define USE_HAL_DTS_REGISTER_CALLBACKS 0U /* DTS register callback disabled */
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */
#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U /* FMAC register callback disabled */
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U /* GFXMMU register callback disabled */
#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U /* OSPI register callback disabled */
#define USE_HAL_OTFDEC_REGISTER_CALLBACKS 0U /* OTFDEC register callback disabled */
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
/* ########################### Ethernet Configuration ######################### */
#define ETH_TX_DESC_CNT 4U /* number of Ethernet Tx DMA descriptors */
#define ETH_RX_DESC_CNT 4U /* number of Ethernet Rx DMA descriptors */
#define ETH_MAC_ADDR0 (0x02UL)
#define ETH_MAC_ADDR1 (0x00UL)
#define ETH_MAC_ADDR2 (0x00UL)
#define ETH_MAC_ADDR3 (0x00UL)
#define ETH_MAC_ADDR4 (0x00UL)
#define ETH_MAC_ADDR5 (0x00UL)
/* ########################## Assert Selection ############################## */
/**
* @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code
*/
/* #define USE_FULL_ASSERT 1U */
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include module's header file
*/
#ifdef HAL_RCC_MODULE_ENABLED
#include "stm32h7xx_hal_rcc.h"
#endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32h7xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32h7xx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_MDMA_MODULE_ENABLED
#include "stm32h7xx_hal_mdma.h"
#endif /* HAL_MDMA_MODULE_ENABLED */
#ifdef HAL_HASH_MODULE_ENABLED
#include "stm32h7xx_hal_hash.h"
#endif /* HAL_HASH_MODULE_ENABLED */
#ifdef HAL_DCMI_MODULE_ENABLED
#include "stm32h7xx_hal_dcmi.h"
#endif /* HAL_DCMI_MODULE_ENABLED */
#ifdef HAL_DMA2D_MODULE_ENABLED
#include "stm32h7xx_hal_dma2d.h"
#endif /* HAL_DMA2D_MODULE_ENABLED */
#ifdef HAL_DSI_MODULE_ENABLED
#include "stm32h7xx_hal_dsi.h"
#endif /* HAL_DSI_MODULE_ENABLED */
#ifdef HAL_DFSDM_MODULE_ENABLED
#include "stm32h7xx_hal_dfsdm.h"
#endif /* HAL_DFSDM_MODULE_ENABLED */
#ifdef HAL_DTS_MODULE_ENABLED
#include "stm32h7xx_hal_dts.h"
#endif /* HAL_DTS_MODULE_ENABLED */
#ifdef HAL_ETH_MODULE_ENABLED
#include "stm32h7xx_hal_eth.h"
#endif /* HAL_ETH_MODULE_ENABLED */
#ifdef HAL_ETH_LEGACY_MODULE_ENABLED
#include "stm32h7xx_hal_eth_legacy.h"
#endif /* HAL_ETH_LEGACY_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32h7xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32h7xx_hal_cortex.h"
#endif /* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_ADC_MODULE_ENABLED
#include "stm32h7xx_hal_adc.h"
#endif /* HAL_ADC_MODULE_ENABLED */
#ifdef HAL_FDCAN_MODULE_ENABLED
#include "stm32h7xx_hal_fdcan.h"
#endif /* HAL_FDCAN_MODULE_ENABLED */
#ifdef HAL_CEC_MODULE_ENABLED
#include "stm32h7xx_hal_cec.h"
#endif /* HAL_CEC_MODULE_ENABLED */
#ifdef HAL_COMP_MODULE_ENABLED
#include "stm32h7xx_hal_comp.h"
#endif /* HAL_COMP_MODULE_ENABLED */
#ifdef HAL_CORDIC_MODULE_ENABLED
#include "stm32h7xx_hal_cordic.h"
#endif /* HAL_CORDIC_MODULE_ENABLED */
#ifdef HAL_CRC_MODULE_ENABLED
#include "stm32h7xx_hal_crc.h"
#endif /* HAL_CRC_MODULE_ENABLED */
#ifdef HAL_CRYP_MODULE_ENABLED
#include "stm32h7xx_hal_cryp.h"
#endif /* HAL_CRYP_MODULE_ENABLED */
#ifdef HAL_DAC_MODULE_ENABLED
#include "stm32h7xx_hal_dac.h"
#endif /* HAL_DAC_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32h7xx_hal_flash.h"
#endif /* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_GFXMMU_MODULE_ENABLED
#include "stm32h7xx_hal_gfxmmu.h"
#endif /* HAL_GFXMMU_MODULE_ENABLED */
#ifdef HAL_FMAC_MODULE_ENABLED
#include "stm32h7xx_hal_fmac.h"
#endif /* HAL_FMAC_MODULE_ENABLED */
#ifdef HAL_HRTIM_MODULE_ENABLED
#include "stm32h7xx_hal_hrtim.h"
#endif /* HAL_HRTIM_MODULE_ENABLED */
#ifdef HAL_HSEM_MODULE_ENABLED
#include "stm32h7xx_hal_hsem.h"
#endif /* HAL_HSEM_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32h7xx_hal_sram.h"
#endif /* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED
#include "stm32h7xx_hal_nor.h"
#endif /* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32h7xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED
#include "stm32h7xx_hal_i2c.h"
#endif /* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_I2S_MODULE_ENABLED
#include "stm32h7xx_hal_i2s.h"
#endif /* HAL_I2S_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32h7xx_hal_iwdg.h"
#endif /* HAL_IWDG_MODULE_ENABLED */
#ifdef HAL_JPEG_MODULE_ENABLED
#include "stm32h7xx_hal_jpeg.h"
#endif /* HAL_JPEG_MODULE_ENABLED */
#ifdef HAL_MDIOS_MODULE_ENABLED
#include "stm32h7xx_hal_mdios.h"
#endif /* HAL_MDIOS_MODULE_ENABLED */
#ifdef HAL_MMC_MODULE_ENABLED
#include "stm32h7xx_hal_mmc.h"
#endif /* HAL_MMC_MODULE_ENABLED */
#ifdef HAL_LPTIM_MODULE_ENABLED
#include "stm32h7xx_hal_lptim.h"
#endif /* HAL_LPTIM_MODULE_ENABLED */
#ifdef HAL_LTDC_MODULE_ENABLED
#include "stm32h7xx_hal_ltdc.h"
#endif /* HAL_LTDC_MODULE_ENABLED */
#ifdef HAL_OPAMP_MODULE_ENABLED
#include "stm32h7xx_hal_opamp.h"
#endif /* HAL_OPAMP_MODULE_ENABLED */
#ifdef HAL_OSPI_MODULE_ENABLED
#include "stm32h7xx_hal_ospi.h"
#endif /* HAL_OSPI_MODULE_ENABLED */
#ifdef HAL_OTFDEC_MODULE_ENABLED
#include "stm32h7xx_hal_otfdec.h"
#endif /* HAL_OTFDEC_MODULE_ENABLED */
#ifdef HAL_PSSI_MODULE_ENABLED
#include "stm32h7xx_hal_pssi.h"
#endif /* HAL_PSSI_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED
#include "stm32h7xx_hal_pwr.h"
#endif /* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_QSPI_MODULE_ENABLED
#include "stm32h7xx_hal_qspi.h"
#endif /* HAL_QSPI_MODULE_ENABLED */
#ifdef HAL_RAMECC_MODULE_ENABLED
#include "stm32h7xx_hal_ramecc.h"
#endif /* HAL_RAMECC_MODULE_ENABLED */
#ifdef HAL_RNG_MODULE_ENABLED
#include "stm32h7xx_hal_rng.h"
#endif /* HAL_RNG_MODULE_ENABLED */
#ifdef HAL_RTC_MODULE_ENABLED
#include "stm32h7xx_hal_rtc.h"
#endif /* HAL_RTC_MODULE_ENABLED */
#ifdef HAL_SAI_MODULE_ENABLED
#include "stm32h7xx_hal_sai.h"
#endif /* HAL_SAI_MODULE_ENABLED */
#ifdef HAL_SD_MODULE_ENABLED
#include "stm32h7xx_hal_sd.h"
#endif /* HAL_SD_MODULE_ENABLED */
#ifdef HAL_SDRAM_MODULE_ENABLED
#include "stm32h7xx_hal_sdram.h"
#endif /* HAL_SDRAM_MODULE_ENABLED */
#ifdef HAL_SPI_MODULE_ENABLED
#include "stm32h7xx_hal_spi.h"
#endif /* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_SPDIFRX_MODULE_ENABLED
#include "stm32h7xx_hal_spdifrx.h"
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
#ifdef HAL_SWPMI_MODULE_ENABLED
#include "stm32h7xx_hal_swpmi.h"
#endif /* HAL_SWPMI_MODULE_ENABLED */
#ifdef HAL_TIM_MODULE_ENABLED
#include "stm32h7xx_hal_tim.h"
#endif /* HAL_TIM_MODULE_ENABLED */
#ifdef HAL_UART_MODULE_ENABLED
#include "stm32h7xx_hal_uart.h"
#endif /* HAL_UART_MODULE_ENABLED */
#ifdef HAL_USART_MODULE_ENABLED
#include "stm32h7xx_hal_usart.h"
#endif /* HAL_USART_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32h7xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32h7xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32h7xx_hal_smbus.h"
#endif /* HAL_SMBUS_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32h7xx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32h7xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_HCD_MODULE_ENABLED
#include "stm32h7xx_hal_hcd.h"
#endif /* HAL_HCD_MODULE_ENABLED */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t *file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif /* STM32H7xx_HAL_CONF_H */
@@ -0,0 +1,69 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_it.h
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32H7xx_IT_H
#define __STM32H7xx_IT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void USART3_IRQHandler(void);
void CM4_SEV_IRQHandler(void);
void HSEM1_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
#ifdef __cplusplus
}
#endif
#endif /* __STM32H7xx_IT_H */
@@ -0,0 +1 @@
used for symbolic linking or referencing from within IDEs, VSCode project is based on Makefiles and therefore this folder is not needed. It is more for CubeIDE Project structure!
@@ -0,0 +1,384 @@
/*
* ipc_eth_consumer.c
*
* Created on: 11.08.2026
* Author: Thorsten
*/
//---------------------------------------------------------------------------------------------------------------------
#include "main.h"
#include "openamp.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
#include "message_buffer.h"
//---------------------------------------------------------------------------------------------------------------------
#include "IPC/ipc_eth_producer.h"
//---------------------------------------------------------------------------------------------------------------------
#define IPC_PKT_HEADERLEN (20 )
#define IPC_PKT_ETHERNET_TYPE (0xDEADC0DE )
#define IPC_PKT_DISCOVERY_TYPE (0xDEADDA7A )
#define IPC_CTRL_TYPE_GETPENDING (0x80 )
#define IPC_CTRL_TYPE_GETIPADDR (0xF0 )
#define IPC_CTRL_TYPE_GETSUBNET (0xF1 )
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t heartbeatPayload = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_DISCOVERY_TYPE,
.type = 0,
.length = 37,
.result = 0,
.seqID = 0,
.payload = "Hello from STM32H755ZI-Q on ARM CM7!"
};
//---------------------------------------------------------------------------------------------------------------------
struct IPC_ETH_PRODUCER_Context
//---------------------------------------------------------------------------------------------------------------------
{
struct rpmsg_endpoint rp_endpoint;
MessageBufferHandle_t mbufH;
TaskHandle_t taskH;
QueueHandle_t reqQH;
int running;
uint8_t tmp[(((IPC_PKT_MAXSIZE+sizeof(void*)-1)/sizeof(void*))*sizeof(void*))];
char payload[IPC_PKT_MAXSIZE+4*sizeof(void*)];
uint32_t ipaddr;
uint32_t bcast;
uint32_t subnet;
};
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t getIPAddress = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_CONTROL_TYPE,
.type = IPC_CTRL_TYPE_GETIPADDR,
.length = 0,
.result = 0,
.seqID = 0,
};
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t ethernetPkt = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_ETHERNET_TYPE,
.type = 0,
.length = 0,
.result = 0,
.seqID = 0,
};
//---------------------------------------------------------------------------------------------------------------------
static IPC_ETH_PRODUCER_Handle_t singleton_h;
//---------------------------------------------------------------------------------------------------------------------
static int ipc_eth_ProducerRpMsgRxCallback(struct rpmsg_endpoint *ept, void *data, size_t len, uint32_t src, void *priv)
//---------------------------------------------------------------------------------------------------------------------
{
(void)ept;
(void)src;
if(!priv)
return 0;
size_t alignedLen = (((len+sizeof(void*)-1)/sizeof(void*))*sizeof(void*));
IPC_ETH_PRODUCER_Handle_t h = (IPC_ETH_PRODUCER_Handle_t)priv;
if ( alignedLen >= sizeof(h->priv->tmp))
return 0;
// this is an additional copy step as it would be when just using the message buffer.
// its a worse idea at all but this helps overcoming an MPU region configuration, which
// requires us to handle addresses aligned when accessing the shared D3 SRAM. other way
// around would be to disable the MPU for the shared D3 region but i want to practice it
// in the correct way as non buffered, non cached and shared region config which requires
// us to handle it in aligned accesses at all. the message buffer has internal mechanism,
// where this handling is not guaranteed at buffer turn around conditions...
for( size_t i = 0; i < alignedLen/4; i++ ) {
((uint32_t*)h->priv->tmp)[i] = ((uint32_t*)(data))[i];
}
xMessageBufferSend(h->priv->mbufH, h->priv->tmp, len, 0);
return 0;
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ProducerRpMsgUnbindCallback(struct rpmsg_endpoint *ept)
//---------------------------------------------------------------------------------------------------------------------
{
if(ept->priv)
{
IPC_ETH_PRODUCER_Handle_t h = (IPC_ETH_PRODUCER_Handle_t)ept->priv;
h->priv->running = 0;
}
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ProducerRpMsgNewEndpoint(struct rpmsg_device *rdev, const char *name, uint32_t dest)
//---------------------------------------------------------------------------------------------------------------------
{
(void)rdev;
OPENAMP_create_endpoint(&singleton_h->priv->rp_endpoint, name, dest,
ipc_eth_ProducerRpMsgRxCallback, ipc_eth_ProducerRpMsgUnbindCallback);
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ProducerTaskFunction( void * arg )
//---------------------------------------------------------------------------------------------------------------------
{
if(!arg)
vTaskDelete(NULL);
IPC_ETH_PRODUCER_Handle_t h = (IPC_ETH_PRODUCER_Handle_t)arg;
size_t bLen = 0;
unsigned int currentPending = 0;
unsigned int rounds = 0;
unsigned int currentSeqID = 0;
__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(0U);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(0U,0);
/* wait until CPU2 wakes up from stop mode */
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET)) {
vTaskDelay(pdMS_TO_TICKS(1));
};
if (!h)
goto error;
if (!h->priv)
goto error;
OPENAMP_Wait_EndPointready(&h->priv->rp_endpoint);
// give the network stack i bit of time before starting all the troubles
vTaskDelay(pdMS_TO_TICKS(6000));
while(h->priv->running) {
vTaskDelay(pdMS_TO_TICKS(1));
OPENAMP_check_for_message();
if ( (bLen = xMessageBufferReceive(h->priv->mbufH, h->priv->payload, sizeof(h->priv->payload), pdMS_TO_TICKS(0))) >= IPC_PKT_HEADERLEN) {
if (currentPending > 0 )
currentPending -= 1;
ipc_eth_packet_t *req = (ipc_eth_packet_t *)h->priv->payload;
if (req->length <= (bLen - IPC_PKT_HEADERLEN)) {
if (req->magic == IPC_PKT_CONTROL_TYPE && req->result == 0 && req->type == IPC_CTRL_TYPE_GETIPADDR) {
memcpy(&h->priv->ipaddr, req->payload, sizeof(h->priv->ipaddr));
}
else if (req->magic == IPC_PKT_CONTROL_TYPE && req->result != 0 && req->type == IPC_CTRL_TYPE_GETIPADDR) {
// in case IP address read was not valid, we will set Subnet and IP address back. this is used to indicate
// missing connection or non functional stack on remote processor
h->priv->subnet = 0;
h->priv->ipaddr = 0;
}
else if (req->magic == IPC_PKT_CONTROL_TYPE && req->result == 0 && req->type == IPC_CTRL_TYPE_GETSUBNET) {
memcpy(&h->priv->subnet, req->payload, sizeof(h->priv->subnet));
}
else if (req->magic == IPC_PKT_CONTROL_TYPE && req->result == 0 && req->type == IPC_CTRL_TYPE_GETPENDING &&
h->callbacks.rxCtrlCallback != NULL) {
int numRequests = req->length / (IPC_PKT_HEADERLEN + IPC_CTRLREMOTE_MAX_LENGTH);
int index = 0;
while(numRequests > 0) {
ipc_eth_packet_t *sreq = (ipc_eth_packet_t *)&req->payload[index * (IPC_PKT_HEADERLEN + IPC_CTRLREMOTE_MAX_LENGTH)];
if (sreq->magic == IPC_PKT_CONTROL_TYPE && sreq->result == 0 && sreq->type >= IPC_CTRLREMOTE_SPINDLE_START &&
sreq->type <= IPC_CTRLREMOTE_STEP_MOVE) {
h->callbacks.rxCtrlCallback(h, sreq, h->callbacks.rxCtrlPriv);
}
numRequests-=1;
index+=1;
}
}
}
}
OPENAMP_check_for_message();
//TODO: don't know why but when more messages are pending, everything is destroyed and
// ends up in hard faults caused by virtio structures and addresses
// outside the shared mem region
if(currentPending < 2) {
if (xQueueReceive(h->priv->reqQH, &ethernetPkt, 0) == pdPASS) {
ethernetPkt.type = 0;
ethernetPkt.magic = IPC_PKT_ETHERNET_TYPE;
if ( OPENAMP_send(&h->priv->rp_endpoint, &ethernetPkt, sizeof(ethernetPkt)) == 0 )
currentPending += 1;
currentSeqID += 1;
}
else if (rounds % 7 == 0) {
getIPAddress.type = IPC_CTRL_TYPE_GETPENDING;
getIPAddress.seqID = currentSeqID;
if( OPENAMP_send(&h->priv->rp_endpoint, &getIPAddress, sizeof(getIPAddress)) == 0 )
currentPending += 1;
currentSeqID += 1;
}
if (rounds % 1000 == 0) {
heartbeatPayload.seqID = currentSeqID;
if ( OPENAMP_send(&h->priv->rp_endpoint, &heartbeatPayload, sizeof(heartbeatPayload)) == 0 )
currentPending += 1;
currentSeqID += 1;
if ( h->callbacks.statusReqCallback != NULL ) {
h->callbacks.statusReqCallback(h, h->callbacks.statusReqPriv);
}
}
else if (rounds % 100 == 5) {
if ( h->callbacks.statusReqCallback != NULL ) {
h->callbacks.statusReqCallback(h, h->callbacks.statusReqPriv);
}
}
else if (rounds % 1000 == 1) {
getIPAddress.type = IPC_CTRL_TYPE_GETIPADDR;
getIPAddress.seqID = currentSeqID;
if ( OPENAMP_send(&h->priv->rp_endpoint, &getIPAddress, sizeof(getIPAddress)) == 0)
currentPending += 1;
currentSeqID += 1;
}
else if (rounds % 1000 == 2) {
getIPAddress.type = IPC_CTRL_TYPE_GETSUBNET;
getIPAddress.seqID = currentSeqID;
if ( OPENAMP_send(&h->priv->rp_endpoint, &getIPAddress, sizeof(getIPAddress)) == 0 )
currentPending += 1;
currentSeqID += 1;
}
rounds += 1;
}
OPENAMP_check_for_message();
}
error:
OPENAMP_DeInit();
vTaskDelete(NULL);
}
//---------------------------------------------------------------------------------------------------------------------
int IPC_ETH_PRODUCER_SendPaket(IPC_ETH_PRODUCER_Handle_t h, void* buff, int size)
//---------------------------------------------------------------------------------------------------------------------
{
if ( h == NULL || buff == NULL || size <= 0 )
return -1;
if ( h->priv == NULL || h->priv->reqQH == NULL )
return -1;
ipc_eth_packet_t pkt = {
.length = size,
.magic = IPC_PKT_ETHERNET_TYPE,
.seqID = 0,
.type = 0,
.result = 0,
};
if(size > sizeof(pkt.payload))
return -1;
memcpy(pkt.payload, buff, size);
return -(xQueueSend(h->priv->reqQH, &pkt, 0) == pdFALSE);
}
//---------------------------------------------------------------------------------------------------------------------
int IPC_ETH_PRODUCER_GetIPAddress(IPC_ETH_PRODUCER_Handle_t h, uint32_t *ipv4, uint32_t *subnet)
//---------------------------------------------------------------------------------------------------------------------
{
if (h == NULL)
return 0;
if (h->priv->ipaddr == 0)
return 0;
if(ipv4)
*ipv4 = h->priv->ipaddr;
if(subnet)
*subnet = h->priv->subnet;
return 1;
}
//---------------------------------------------------------------------------------------------------------------------
IPC_ETH_PRODUCER_Handle_t IPC_ETH_PRODUCER_Init(const char *endpoint)
//---------------------------------------------------------------------------------------------------------------------
{
IPC_ETH_PRODUCER_Handle_t h = NULL;
int OpenAmpInit = 0;
if(!endpoint)
goto error;
if(endpoint[0] == '\0')
goto error;
if (MAILBOX_Init())
goto error;
if(!(h = (IPC_ETH_PRODUCER_Handle_t)calloc(1, sizeof(struct IPC_ETH_PRODUCER_Handle))))
goto error;
h->priv = (IPC_ETH_PRODUCER_Context_t)calloc(1, sizeof(struct IPC_ETH_PRODUCER_Context));
if(!h->priv)
goto error;
rpmsg_init_ept(&h->priv->rp_endpoint, endpoint, RPMSG_ADDR_ANY, RPMSG_ADDR_ANY, NULL, NULL);
// set this instance as private data
h->priv->rp_endpoint.priv = h;
singleton_h = h;
if (MX_OPENAMP_Init(RPMSG_MASTER, ipc_eth_ProducerRpMsgNewEndpoint) != 0) {
goto error;
}
OpenAmpInit = 1;
if ((h->priv->mbufH = xMessageBufferCreate(4*IPC_PKT_MAXSIZE)) == NULL)
goto error;
if ((h->priv->reqQH = xQueueCreate(4, sizeof(ethernetPkt))) == NULL)
goto error;
h->priv->running = 1;
if (pdPASS != xTaskCreate(ipc_eth_ProducerTaskFunction, "user2ipc", 4096, h, configMAX_PRIORITIES - 2, &h->priv->taskH))
goto error;
return h;
error:
if (h) {
if(h->priv) {
if(h->priv->taskH) {
h->priv->running = 0;
vTaskDelete(h->priv->taskH);
}
if(h->priv->rp_endpoint.priv == h) {
// no abstraction for destroying, so calling library function directly
rpmsg_destroy_ept(&h->priv->rp_endpoint);
}
if(h->priv->mbufH) {
vMessageBufferDelete(h->priv->mbufH);
}
if(h->priv->reqQH) {
vQueueDelete(h->priv->reqQH);
}
free(h->priv);
}
free(h);
}
h = NULL;
if ( OpenAmpInit )
OPENAMP_DeInit();
return h;
}
@@ -0,0 +1 @@
used for symbolic linking or referencing from within IDEs, VSCode project is based on Makefiles and therefore this folder is not needed. It is more for CubeIDE Project structure!
@@ -0,0 +1,757 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "openamp.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#ifndef HSEM_ID_0
#define HSEM_ID_0 (0U) /* HW semaphore 0*/
#endif
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
TIM_HandleTypeDef htim2;
UART_HandleTypeDef huart3;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MPU_Config(void);
static void MX_GPIO_Init(void);
static void MX_SPI1_Init(void);
static void MX_TIM2_Init(void);
static void MX_USART3_UART_Init(void);
/* USER CODE BEGIN PFP */
extern void initialise_stdlib_abstraction( void );
void vApplicationMallocFailedHook( void )
{
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
static char myChar = 0;
QueueHandle_t uartRxQueue;
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
// --------------------------------------------------------------------------------------------------------------------
static void playgroundTask(void* args)
// --------------------------------------------------------------------------------------------------------------------
{
(void)args;
while(1) {
vTaskDelay(pdMS_TO_TICKS(10));
}
vTaskDelete(xTaskGetCurrentTaskHandle());
}
// --------------------------------------------------------------------------------------------------------------------
static int CapabilityFunc( int argc, char** argv, void* ctx )
// --------------------------------------------------------------------------------------------------------------------
{
(void)argc;
(void)argv;
(void)ctx;
printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\r\nOK",
0, // has spindle
0, // has spindle status
0, // has stepper
0, // has stepper move relative
0, // has stepper move speed
0, // has stepper move async
0, // has stepper status
0, // has stepper refrun
0, // has stepper refrun timeout
0, // has stepper refrun skip
0, // has stepper refrun stay enabled
0, // has stepper reset
0, // has stepper position
0, // has stepper config
0, // has stepper config torque
0, // has stepper config throvercurr
0, // has stepper config powerena
0, // has stepper config stepmode
0, // has stepper config timeoff
0, // has stepper config timeon
0, // has stepper config timefast
0, // has stepper config mmperturn
0, // has stepper config posmax
0, // has stepper config posmin
0, // has stepper config posref
0, // has stepper config stepsperturn
0 // has stepper cancel
);
return 0;
}
#define BKPSRAM_BASE 0x38800000UL
typedef struct {
uint32_t magic;
uint32_t uuid[3];
} device_shared_t;
#define DEVICE_SHARED \
((volatile device_shared_t *)BKPSRAM_BASE)
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
__HAL_RCC_BKPRAM_CLK_ENABLE();
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//RCC->GCR |= RCC_GCR_BOOT_C2;
//HAL_PWREx_ReleaseCore(PWR_CORE_CPU2);
HAL_PWR_EnableBkUpAccess();
FLASH_OBProgramInitTypeDef OptionsBytesStruct;
//HAL_FLASHEx_EnableDebugger();
HAL_FLASHEx_OBGetConfig(&OptionsBytesStruct);
uint32_t prev = OptionsBytesStruct.USERConfig;
#define BCM4 (1 << 22)
#define BCM7 (1 << 23)
#define nRST_STOP_D2 (1 << 24)
#define nRST_STDY_D2 (1 << 25)
if (!(OptionsBytesStruct.USERConfig & BCM4))
OptionsBytesStruct.USERConfig |= BCM4;
if (!(OptionsBytesStruct.USERConfig & BCM7))
OptionsBytesStruct.USERConfig |= BCM7;
if (!(OptionsBytesStruct.USERConfig & nRST_STOP_D2))
OptionsBytesStruct.USERConfig |= nRST_STOP_D2;
if (!(OptionsBytesStruct.USERConfig & nRST_STDY_D2))
OptionsBytesStruct.USERConfig |= nRST_STDY_D2;
if ( prev != OptionsBytesStruct.USERConfig) {
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//HAL_FLASHEx_OBProgram(&OptionsBytesStruct);
}
DEVICE_SHARED->uuid[0] = *(volatile uint32_t *)0x1FF1E800UL;
DEVICE_SHARED->uuid[1] = *(volatile uint32_t *)0x1FF1E804UL;
DEVICE_SHARED->uuid[2] = *(volatile uint32_t *)0x1FF1E808UL;
__DMB();
DEVICE_SHARED->magic = 0x48475531; // "HGU1"
__DMB();
/* USER CODE END 1 */
/* USER CODE BEGIN Boot_Mode_Sequence_0 */
/* USER CODE END Boot_Mode_Sequence_0 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_1 */
/* Wait until CPU2 boots and enters in stop mode or timeout*/
int timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
/*if ( timeout < 0 )
{
Error_Handler();
}*/
/* USER CODE END Boot_Mode_Sequence_1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_2 */
/* When system initialization is finished, Cortex-M7 will release Cortex-M4 by means of
HSEM notification */
/*HW semaphore Clock enable*/
__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(HSEM_ID_0);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(HSEM_ID_0,0);
/* wait until CPU2 wakes up from stop mode */
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET));
/* USER CODE END Boot_Mode_Sequence_2 */
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI1_Init();
MX_TIM2_Init();
MX_USART3_UART_Init();
/* USER CODE BEGIN 2 */
// cretae a free rtos queue to buffer console characters received from debug uart
uartRxQueue = xQueueCreate(64, sizeof(char));
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
// create a playground task at the very beginning
xTaskCreate(playgroundTask, "playground", 128, NULL, 1, NULL);
// mask a compiler warning by referencing the function but not using it (void cast)
(void)CapabilityFunc;
// start the scheduler and setup free rtos execution context
vTaskStartScheduler();
// we should never reach that point!
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = 1;
RCC_OscInitStruct.PLL.PLLN = 100;
RCC_OscInitStruct.PLL.PLLP = 2;
RCC_OscInitStruct.PLL.PLLQ = 4;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2
|RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief SPI1 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI1_Init(void)
{
/* USER CODE BEGIN SPI1_Init 0 */
/* USER CODE END SPI1_Init 0 */
/* USER CODE BEGIN SPI1_Init 1 */
/* USER CODE END SPI1_Init 1 */
/* SPI1 parameter configuration*/
hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 0x0;
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
hspi1.Init.NSSPolarity = SPI_NSS_POLARITY_LOW;
hspi1.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA;
hspi1.Init.TxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.RxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.MasterSSIdleness = SPI_MASTER_SS_IDLENESS_00CYCLE;
hspi1.Init.MasterInterDataIdleness = SPI_MASTER_INTERDATA_IDLENESS_00CYCLE;
hspi1.Init.MasterReceiverAutoSusp = SPI_MASTER_RX_AUTOSUSP_DISABLE;
hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_DISABLE;
hspi1.Init.IOSwap = SPI_IO_SWAP_DISABLE;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI1_Init 2 */
/* USER CODE END SPI1_Init 2 */
}
/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = 0;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 9999;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
HAL_TIM_MspPostInit(&htim2);
}
/**
* @brief USART3 Initialization Function
* @param None
* @retval None
*/
static void MX_USART3_UART_Init(void)
{
/* USER CODE BEGIN USART3_Init 0 */
/* USER CODE END USART3_Init 0 */
/* USER CODE BEGIN USART3_Init 1 */
/* USER CODE END USART3_Init 1 */
huart3.Instance = USART3;
huart3.Init.BaudRate = 115200;
huart3.Init.WordLength = UART_WORDLENGTH_8B;
huart3.Init.StopBits = UART_STOPBITS_1;
huart3.Init.Parity = UART_PARITY_NONE;
huart3.Init.Mode = UART_MODE_TX_RX;
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1;
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart3) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART3_Init 2 */
/* USER CODE END USART3_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, LED_GREEN_Pin|LED_RED_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, STEP_SPI_CS_Pin|STEP_PULSE_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOG, STEP_RSTN_Pin|STEP_DIR_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : SPINDLE_ENA_L_Pin SPINDLE_ENA_R_Pin LED_YELLOW_Pin */
GPIO_InitStruct.Pin = SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pin : USR_BUTTON_Pin */
GPIO_InitStruct.Pin = USR_BUTTON_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USR_BUTTON_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_R_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_R_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : LED_GREEN_Pin LED_RED_Pin */
GPIO_InitStruct.Pin = LED_GREEN_Pin|LED_RED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_SPI_CS_Pin STEP_PULSE_Pin */
GPIO_InitStruct.Pin = STEP_SPI_CS_Pin|STEP_PULSE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_RSTN_Pin STEP_DIR_Pin */
GPIO_InitStruct.Pin = STEP_RSTN_Pin|STEP_DIR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/*Configure GPIO pin : STEP_FLAG_Pin */
GPIO_InitStruct.Pin = STEP_FLAG_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(STEP_FLAG_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : REFERENCE_MARK_Pin LIMIT_SWITCH_Pin */
GPIO_InitStruct.Pin = REFERENCE_MARK_Pin|LIMIT_SWITCH_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_L_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_L_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_L_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine )
{
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
taskENTER_CRITICAL();
{
/* You can step out of this function to debug the assertion by using
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
}
}
taskEXIT_CRITICAL();
}
int __stdout_put_char(int ch)
{
uint8_t val = ch;
while((huart3.Instance->ISR & UART_FLAG_TXE) == 0);
huart3.Instance->TDR = val;
while((huart3.Instance->ISR & UART_FLAG_TC) == 0);
return 0;
}
int __stdin_get_char(void)
{
if ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED )
{
if (huart3.Instance->ISR & UART_FLAG_ORE)
huart3.Instance->ICR = UART_CLEAR_OREF;
if (huart3.Instance->ISR & UART_FLAG_NE)
huart3.Instance->ICR = UART_CLEAR_NEF;
if (huart3.Instance->ISR & UART_FLAG_FE)
huart3.Instance->ICR = UART_CLEAR_FEF;
if ((huart3.Instance->ISR & UART_FLAG_RXNE) == 0) return -1;
return huart3.Instance->RDR;
}
else
{
// we make sure that EOF is returned in case there is a small pause time
// in the input sequence, therefore we do not block infinitely long!
int value = EOF;
if ( xQueueReceive(uartRxQueue, &value, 10 ) ) return value;
else return EOF;
}
}
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if ( huart->Instance == USART3 )
{
if ( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED )
{
xQueueSendFromISR(uartRxQueue, &myChar, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
if ( huart->Instance == USART3 )
{
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
/* USER CODE END 4 */
/* MPU Configuration */
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct = {0};
/* Disables the MPU */
HAL_MPU_Disable();
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x0;
MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
MPU_InitStruct.SubRegionDisable = 0x87;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER1;
MPU_InitStruct.BaseAddress = 0x38000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_64KB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,757 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "openamp.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#ifndef HSEM_ID_0
#define HSEM_ID_0 (0U) /* HW semaphore 0*/
#endif
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
TIM_HandleTypeDef htim2;
UART_HandleTypeDef huart3;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MPU_Config(void);
static void MX_GPIO_Init(void);
static void MX_SPI1_Init(void);
static void MX_TIM2_Init(void);
static void MX_USART3_UART_Init(void);
/* USER CODE BEGIN PFP */
extern void initialise_stdlib_abstraction( void );
void vApplicationMallocFailedHook( void )
{
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
static char myChar = 0;
QueueHandle_t uartRxQueue;
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
// --------------------------------------------------------------------------------------------------------------------
static void playgroundTask(void* args)
// --------------------------------------------------------------------------------------------------------------------
{
(void)args;
while(1) {
vTaskDelay(pdMS_TO_TICKS(10));
}
vTaskDelete(xTaskGetCurrentTaskHandle());
}
// --------------------------------------------------------------------------------------------------------------------
static int CapabilityFunc( int argc, char** argv, void* ctx )
// --------------------------------------------------------------------------------------------------------------------
{
(void)argc;
(void)argv;
(void)ctx;
printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\r\nOK",
0, // has spindle
0, // has spindle status
0, // has stepper
0, // has stepper move relative
0, // has stepper move speed
0, // has stepper move async
0, // has stepper status
0, // has stepper refrun
0, // has stepper refrun timeout
0, // has stepper refrun skip
0, // has stepper refrun stay enabled
0, // has stepper reset
0, // has stepper position
0, // has stepper config
0, // has stepper config torque
0, // has stepper config throvercurr
0, // has stepper config powerena
0, // has stepper config stepmode
0, // has stepper config timeoff
0, // has stepper config timeon
0, // has stepper config timefast
0, // has stepper config mmperturn
0, // has stepper config posmax
0, // has stepper config posmin
0, // has stepper config posref
0, // has stepper config stepsperturn
0 // has stepper cancel
);
return 0;
}
#define BKPSRAM_BASE 0x38800000UL
typedef struct {
uint32_t magic;
uint32_t uuid[3];
} device_shared_t;
#define DEVICE_SHARED \
((volatile device_shared_t *)BKPSRAM_BASE)
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
__HAL_RCC_BKPRAM_CLK_ENABLE();
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//RCC->GCR |= RCC_GCR_BOOT_C2;
//HAL_PWREx_ReleaseCore(PWR_CORE_CPU2);
HAL_PWR_EnableBkUpAccess();
FLASH_OBProgramInitTypeDef OptionsBytesStruct;
//HAL_FLASHEx_EnableDebugger();
HAL_FLASHEx_OBGetConfig(&OptionsBytesStruct);
uint32_t prev = OptionsBytesStruct.USERConfig;
#define BCM4 (1 << 22)
#define BCM7 (1 << 23)
#define nRST_STOP_D2 (1 << 24)
#define nRST_STDY_D2 (1 << 25)
if (!(OptionsBytesStruct.USERConfig & BCM4))
OptionsBytesStruct.USERConfig |= BCM4;
if (!(OptionsBytesStruct.USERConfig & BCM7))
OptionsBytesStruct.USERConfig |= BCM7;
if (!(OptionsBytesStruct.USERConfig & nRST_STOP_D2))
OptionsBytesStruct.USERConfig |= nRST_STOP_D2;
if (!(OptionsBytesStruct.USERConfig & nRST_STDY_D2))
OptionsBytesStruct.USERConfig |= nRST_STDY_D2;
if ( prev != OptionsBytesStruct.USERConfig) {
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//HAL_FLASHEx_OBProgram(&OptionsBytesStruct);
}
DEVICE_SHARED->uuid[0] = *(volatile uint32_t *)0x1FF1E800UL;
DEVICE_SHARED->uuid[1] = *(volatile uint32_t *)0x1FF1E804UL;
DEVICE_SHARED->uuid[2] = *(volatile uint32_t *)0x1FF1E808UL;
__DMB();
DEVICE_SHARED->magic = 0x48475531; // "HGU1"
__DMB();
/* USER CODE END 1 */
/* USER CODE BEGIN Boot_Mode_Sequence_0 */
/* USER CODE END Boot_Mode_Sequence_0 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_1 */
/* Wait until CPU2 boots and enters in stop mode or timeout*/
int timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
/*if ( timeout < 0 )
{
Error_Handler();
}*/
/* USER CODE END Boot_Mode_Sequence_1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_2 */
/* When system initialization is finished, Cortex-M7 will release Cortex-M4 by means of
HSEM notification */
/*HW semaphore Clock enable*/
__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(HSEM_ID_0);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(HSEM_ID_0,0);
/* wait until CPU2 wakes up from stop mode */
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET));
/* USER CODE END Boot_Mode_Sequence_2 */
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI1_Init();
MX_TIM2_Init();
MX_USART3_UART_Init();
/* USER CODE BEGIN 2 */
// cretae a free rtos queue to buffer console characters received from debug uart
uartRxQueue = xQueueCreate(64, sizeof(char));
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
// create a playground task at the very beginning
xTaskCreate(playgroundTask, "playground", 128, NULL, 1, NULL);
// mask a compiler warning by referencing the function but not using it (void cast)
(void)CapabilityFunc;
// start the schedular and setup free rtos execution context
vTaskStartScheduler();
// we should never reach that point!
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = 1;
RCC_OscInitStruct.PLL.PLLN = 100;
RCC_OscInitStruct.PLL.PLLP = 2;
RCC_OscInitStruct.PLL.PLLQ = 4;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2
|RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief SPI1 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI1_Init(void)
{
/* USER CODE BEGIN SPI1_Init 0 */
/* USER CODE END SPI1_Init 0 */
/* USER CODE BEGIN SPI1_Init 1 */
/* USER CODE END SPI1_Init 1 */
/* SPI1 parameter configuration*/
hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 0x0;
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
hspi1.Init.NSSPolarity = SPI_NSS_POLARITY_LOW;
hspi1.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA;
hspi1.Init.TxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.RxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.MasterSSIdleness = SPI_MASTER_SS_IDLENESS_00CYCLE;
hspi1.Init.MasterInterDataIdleness = SPI_MASTER_INTERDATA_IDLENESS_00CYCLE;
hspi1.Init.MasterReceiverAutoSusp = SPI_MASTER_RX_AUTOSUSP_DISABLE;
hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_DISABLE;
hspi1.Init.IOSwap = SPI_IO_SWAP_DISABLE;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI1_Init 2 */
/* USER CODE END SPI1_Init 2 */
}
/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = 0;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 9999;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
HAL_TIM_MspPostInit(&htim2);
}
/**
* @brief USART3 Initialization Function
* @param None
* @retval None
*/
static void MX_USART3_UART_Init(void)
{
/* USER CODE BEGIN USART3_Init 0 */
/* USER CODE END USART3_Init 0 */
/* USER CODE BEGIN USART3_Init 1 */
/* USER CODE END USART3_Init 1 */
huart3.Instance = USART3;
huart3.Init.BaudRate = 115200;
huart3.Init.WordLength = UART_WORDLENGTH_8B;
huart3.Init.StopBits = UART_STOPBITS_1;
huart3.Init.Parity = UART_PARITY_NONE;
huart3.Init.Mode = UART_MODE_TX_RX;
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1;
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart3) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART3_Init 2 */
/* USER CODE END USART3_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, LED_GREEN_Pin|LED_RED_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, STEP_SPI_CS_Pin|STEP_PULSE_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOG, STEP_RSTN_Pin|STEP_DIR_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : SPINDLE_ENA_L_Pin SPINDLE_ENA_R_Pin LED_YELLOW_Pin */
GPIO_InitStruct.Pin = SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pin : USR_BUTTON_Pin */
GPIO_InitStruct.Pin = USR_BUTTON_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USR_BUTTON_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_R_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_R_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : LED_GREEN_Pin LED_RED_Pin */
GPIO_InitStruct.Pin = LED_GREEN_Pin|LED_RED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_SPI_CS_Pin STEP_PULSE_Pin */
GPIO_InitStruct.Pin = STEP_SPI_CS_Pin|STEP_PULSE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_RSTN_Pin STEP_DIR_Pin */
GPIO_InitStruct.Pin = STEP_RSTN_Pin|STEP_DIR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/*Configure GPIO pin : STEP_FLAG_Pin */
GPIO_InitStruct.Pin = STEP_FLAG_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(STEP_FLAG_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : REFERENCE_MARK_Pin LIMIT_SWITCH_Pin */
GPIO_InitStruct.Pin = REFERENCE_MARK_Pin|LIMIT_SWITCH_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_L_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_L_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_L_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine )
{
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
taskENTER_CRITICAL();
{
/* You can step out of this function to debug the assertion by using
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
}
}
taskEXIT_CRITICAL();
}
int __stdout_put_char(int ch)
{
uint8_t val = ch;
while((huart3.Instance->ISR & UART_FLAG_TXE) == 0);
huart3.Instance->TDR = val;
while((huart3.Instance->ISR & UART_FLAG_TC) == 0);
return 0;
}
int __stdin_get_char(void)
{
if ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED )
{
if (huart3.Instance->ISR & UART_FLAG_ORE)
huart3.Instance->ICR = UART_CLEAR_OREF;
if (huart3.Instance->ISR & UART_FLAG_NE)
huart3.Instance->ICR = UART_CLEAR_NEF;
if (huart3.Instance->ISR & UART_FLAG_FE)
huart3.Instance->ICR = UART_CLEAR_FEF;
if ((huart3.Instance->ISR & UART_FLAG_RXNE) == 0) return -1;
return huart3.Instance->RDR;
}
else
{
// we make sure that EOF is returned in case there is a small pause time
// in the input sequence, therefore we do not block infinitely long!
int value = EOF;
if ( xQueueReceive(uartRxQueue, &value, 10 ) ) return value;
else return EOF;
}
}
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if ( huart->Instance == USART3 )
{
if ( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED )
{
xQueueSendFromISR(uartRxQueue, &myChar, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
if ( huart->Instance == USART3 )
{
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
/* USER CODE END 4 */
/* MPU Configuration */
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct = {0};
/* Disables the MPU */
HAL_MPU_Disable();
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x0;
MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
MPU_InitStruct.SubRegionDisable = 0x87;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER1;
MPU_InitStruct.BaseAddress = 0x38000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_64KB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,868 @@
/**
* \file mvsyscall.c
* \brief Wrappers required to use newlib malloc-family within FreeRTOS.
* The syscalls for stdlib are implemented in a minimum way as well
*
* \par Overview
* Route FreeRTOS memory management functions to newlib's malloc family.
* Thus newlib and FreeRTOS share memory-management routines and memory pool,
* and all newlib's internal memory-management requirements are supported.
*
* \author Dave Nadler
* \author Thorsten Kimmel
* \date 20-August-2019
* \version 02-Dec-2021 implemented syscalls for stdlib
* \version 27-Jun-2020 Correct "FreeRTOS.h" capitalization, commentary
* \version 24-Jun-2020 commentary only
* \version 11-Sep-2019 malloc accounting, comments, newlib version check
*
* \see http://www.nadler.com/embedded/newlibAndFreeRTOS.html
* \see https://sourceware.org/newlib/libc.html#Reentrancy
* \see https://sourceware.org/newlib/libc.html#malloc
* \see https://sourceware.org/newlib/libc.html#index-_005f_005fenv_005flock
* \see https://sourceware.org/newlib/libc.html#index-_005f_005fmalloc_005flock
* \see https://sourceforge.net/p/freertos/feature-requests/72/
* \see http://www.billgatliff.com/newlib.html
* \see http://wiki.osdev.org/Porting_Newlib
* \see http://www.embecosm.com/appnotes/ean9/ean9-howto-newlib-1.0.html
*
*
* \copyright
* (c) Dave Nadler 2017-2020, All Rights Reserved.
* Web: http://www.nadler.com
* email: drn@nadler.com
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Use or redistributions of source code must retain the above copyright notice,
* this list of conditions, and the following disclaimer.
*
* - Use or redistributions of source code must retain ALL ORIGINAL COMMENTS, AND
* ANY CHANGES MUST BE DOCUMENTED, INCLUDING:
* - Reason for change (purpose)
* - Functional change
* - Date and author contact
*
* - Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*!
* Includes
*/
// ----------------------------------------------------------------------------
#include <sys/stat.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
#include <newlib.h>
#include <malloc.h>
#include <FreeRTOS.h>
/*!
* In case there is a FreeRTOS used for this application, we have to include
* additional dependencies which are used in memory wrappers
*/
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
# include "task.h"
# include "semphr.h"
#endif
// ----------------------------------------------------------------------------
/*!
* conditional check to make sure this syscall abstraction and the memory
* wrapper fits to the correct newlib / stdlib version
*/
// ----------------------------------------------------------------------------
#if (( __NEWLIB__ != 3) && ( __NEWLIB__ != 4 )) || ((__NEWLIB__ != 3) && (__NEWLIB_MINOR__ < 1)) || \
((__NEWLIB__ == 3) && (__NEWLIB_MINOR__ > 3) )
#warning "This wrapper was verified for newlib versions 3.1 - 3.3; please ensure newlib's external requirements for malloc-family are unchanged!"
#endif
// ----------------------------------------------------------------------------
/*!
* conditional check to make sure the correct reentrancy configuration has been
* set. Otherwise the stdlib calls could be lead to undefined behavior whenever
* a function is called simultaneous by more than one thread
*/
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
# if !defined(configUSE_NEWLIB_REENTRANT) || (configUSE_NEWLIB_REENTRANT != 1)
# error "#define configUSE_NEWLIB_REENTRANT 1 which is required for thread-safety of newlib sprintf, dtoa, strtok, etc..."
# endif
#endif
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
// ----------------------------------------------------------------------------
// The following functions are used to lock IRQs to make sure the newlib functions
// can be used in an IRQ as well, this is not working as expected and so we disable it
// for our platform so far, therefore we have to make sure the user can not enter newlib
// functions when running in ISR context
//! Disables interrupts (after saving prior state)
# define NEWLIB_FUNCS_INSIDE_ISR 0
# if defined(NEWLIB_FUNCS_INSIDE_ISR) && NEWLIB_FUNCS_INSIDE_ISR != 0
define DRN_ENTER_CRITICAL_SECTION(_usis) { _usis = taskENTER_CRITICAL_FROM_ISR(); }
# else
# define DRN_ENTER_CRITICAL_SECTION(_usis) do { int insideAnISR = xPortIsInsideInterrupt(); configASSERT( !insideAnISR ); } while(0)
# endif
//! Re-enables interrupts (unless already disabled prior taskENTER_CRITICAL)
# if defined(NEWLIB_FUNCS_INSIDE_ISR) && NEWLIB_FUNCS_INSIDE_ISR != 0
# define DRN_EXIT_CRITICAL_SECTION(_usis) { taskEXIT_CRITICAL_FROM_ISR(_usis); }
# else
# define DRN_EXIT_CRITICAL_SECTION(_usis)
# endif
// ----------------------------------------------------------------------------
# define __HeapBase _end
# define __HeapLimit _estack
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV
/*!
* The symbols __HeapBase and __HeapLimit are defined to read the
* heap parameters from symbols defined in the linker script. The
* define macros above are used to adapt these names to the name
* of the variable in the linker script. Both variables will be used
* later to allocate and manage memory of the heap and to detect a
* stack / heap crash...
*/
// ----------------------------------------------------------------------------
extern char __HeapBase, __HeapLimit;
int _write( int file, char* ptr, int len );
int _read( int file, char* ptr, int len );
/*!
* The following semaphore is used to prevent the stdout and stderr device
* to be accessed simultaneous while writing data. This is necessary because
* the stdlib itself is thread safe and has its own buffers for a thread but
* the access to the hardware must be locked as well
*/
// ----------------------------------------------------------------------------
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
static SemaphoreHandle_t stdioSemaphore;
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
static SemaphoreHandle_t mallocSemaphore;
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
static SemaphoreHandle_t envSemaphore;
#endif
#endif
/*!
* pointer to array of char* strings that define the current
* environment variables of the applications environment
*/
// ----------------------------------------------------------------------------
#define xstr(a) str(a)
#define str(a) #a
#define NEWLIB_ENV "STDLIB=newlib-" xstr(__NEWLIB__) "." xstr(__NEWLIB_MINOR__)
#ifdef NDEBUG
# define DEBUG_ENV "DEBUG_ENV=RELEASE"
#else
# define DEBUG_ENV "DEBUG_ENV=DEBUG"
#endif
#define GNUC_ENV "GNUC=" xstr(__GNUC__) "." xstr(__GNUC_MINOR__)
#define OS_VERSION_ENV "OSVERSION=" xstr(tskKERNEL_VERSION_MAJOR) "." xstr(tskKERNEL_VERSION_MINOR)
static char* __env[] = { "ARCH=ARM32", "MCU=STM32F746ZI", "PLATFORM=ARM_FW_PLAYGROUND", "OS=FreeRTOS", "USERNAME=STM32",
NEWLIB_ENV, OS_VERSION_ENV, GNUC_ENV, DEBUG_ENV, "BUILDTIME=" xstr(__TIME__), "BUILDDATE=" xstr(__DATE__),
NULL
};
char** environ = &__env[0];
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable stdout channel which can be used
* for debugging purposes in the application
* \param chr
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __stdout_put_char( int chr );
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable stdin channel which can be used
* for debugging purposes in the application
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) int __stdin_get_char( void )
{
return -1;
}
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable clock tick function which is used
* by the stdlib
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) unsigned long long __stdlib_get_system_clock_ticks( void )
{
#if defined(INC_FREERTOS_H)
return (unsigned long long)xTaskGetTickCount();
#else
return 0;
#endif
}
// ----------------------------------------------------------------------------
/*!
* \brief semihosting initialization function which should be called when _start
* is called. afterwards main would be called.
*/
// ----------------------------------------------------------------------------
void initialise_monitor_handles( void )
// ----------------------------------------------------------------------------
{
}
/*!
* \brief this function will be called after initialization of the .bss, .text,
* and .data segment of the application and while the stdlib begins to initialize
* its requirements. This is done by calling the __libc_init_array in _start.S routine
* before calling the main function. By tagging a function with the "constructor"
* attribute, the compiler will add the function pointer to this initialization list.
* \attention This is a GCC attribute. In case the application is compiled with another
* compiler, this attribute must be ported as well!
*/
// ----------------------------------------------------------------------------
__attribute__((constructor))
void initialise_stdlib_abstraction( void )
// ----------------------------------------------------------------------------
{
initialise_monitor_handles();
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
stdioSemaphore = xSemaphoreCreateRecursiveMutex();
if ( stdioSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
mallocSemaphore = xSemaphoreCreateRecursiveMutex();
if ( mallocSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
envSemaphore = xSemaphoreCreateRecursiveMutex();
if ( envSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
}
/*!
* \brief returns the process ID (PID) of the calling process.
* \attention we have no real OS and so we only return PID 1 because
* this is the only running process. Everything is in "kernel space" or
* "machine mode"
*/
// ----------------------------------------------------------------------------
int _getpid( void )
// ----------------------------------------------------------------------------
{
return 1;
}
/*!
* \brief The command kill sends the specified signal to the specified
* process.
* \attention we have no real OS and so we cannot kill our only running
* process with PID 1
*/
// ----------------------------------------------------------------------------
int _kill( int pid, int sig )
// ----------------------------------------------------------------------------
{
( void )pid;
( void )sig;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EINVAL;
}
errno = EINVAL;
return -1;
}
/*!
* \brief The command exit is used to stop the process or application
* \attention if the application has called exit, we do must not return
* from this function anymore
*/
// ----------------------------------------------------------------------------
__attribute__( ( noreturn ) )
void _exit ( int status )
// ----------------------------------------------------------------------------
{
_kill( status, -1 );
while ( 1 ) {}
}
/*!
* \brief attempts to read up to 'len' bytes from file descriptor 'file'
* into the buffer starting at 'ptr'.
* \note currently there is only support for stdin. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _read( int file, char* ptr, int len )
// ----------------------------------------------------------------------------
{
( void )file;
int DataIdx;
int resLen = 0;
if ( file == STDIN_FILENO )
{
for ( DataIdx = 0; DataIdx < len; )
{
int result = __stdin_get_char();
if ( result == EOF )
{
if ( resLen == 0 )
{
resLen = EOF;
}
break;
}
*ptr++ = ( char )result;
resLen++;
DataIdx++;
}
}
else
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EBADF;
}
errno = EBADF;
return -1;
}
return resLen;
}
/*!
* \brief attempts to write 'len' bytes from file descriptor 'file'
* out of the buffer starting at 'ptr'.
* \note currently there is only support for stdout and stderr. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _write( int file, char* ptr, int len )
// ----------------------------------------------------------------------------
{
( void )file;
int DataIdx, locked = 0;
if ( file == STDOUT_FILENO || file == STDERR_FILENO )
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( stdioSemaphore, -1 );
locked = 1;
}
#endif
if (file == STDERR_FILENO)
{
__stdout_put_char('\033');
__stdout_put_char('[');
__stdout_put_char('3');
__stdout_put_char('1');
__stdout_put_char('m');
}
for ( DataIdx = 0; DataIdx < len; DataIdx++ )
{
__stdout_put_char( ptr[DataIdx] );
}
if (file == STDERR_FILENO)
{
__stdout_put_char('\033');
__stdout_put_char('[');
__stdout_put_char('0');
__stdout_put_char('m');
}
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
if ( locked )
{
xSemaphoreGiveRecursive( stdioSemaphore );
}
#endif
return len;
}
else
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EBADF;
}
errno = EBADF;
return -1;
}
}
/*!
* \brief attempts to close a descriptor.
* \note currently there is no support for this function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _close( int file )
// ----------------------------------------------------------------------------
{
( void )file;
return -1;
}
/*!
* \brief These function returns information about a file, in the buffer
* pointed to by stat
* \note currently there is only support for stdin/out/err function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _fstat( int file, struct stat* st )
// ----------------------------------------------------------------------------
{
st->st_dev = file;
st->st_size = 0;
st->st_blocks = 0;
if ( file >= 1 && file <= 3 )
{
st->st_mode = S_IFCHR;
return 0;
}
else
{
st->st_mode = S_IFREG;
return -1;
}
}
/*!
* \brief checks wether a descriptor 'file' is a TTY device or not
* \note currently there is only support for stdin/out/err function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _isatty( int file )
// ----------------------------------------------------------------------------
{
// is stdin, stdout or stderror
if ( file >= 0 && file <= 2 )
{
return file;
}
return 0;
}
// ----------------------------------------------------------------------------
int _lseek( int file, int ptr, int dir )
// ----------------------------------------------------------------------------
{
( void )file;
( void )ptr;
( void )dir;
return 0;
}
// ----------------------------------------------------------------------------
int _open( char* path, int flags, ... )
// ----------------------------------------------------------------------------
{
( void )path;
( void )flags;
/* Pretend like we always fail */
return -1;
}
// ----------------------------------------------------------------------------
int _wait( int* status )
// ----------------------------------------------------------------------------
{
( void )status;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ECHILD;
}
errno = ECHILD;
return -1;
}
// ----------------------------------------------------------------------------
int _unlink( char* name )
// ----------------------------------------------------------------------------
{
( void )name;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOENT;
}
errno = ENOENT;
return -1;
}
// ----------------------------------------------------------------------------
int _times( struct tms* buf )
// ----------------------------------------------------------------------------
{
buf->tms_utime = buf->tms_cutime = 0; // we have no user space!
buf->tms_stime = buf->tms_cstime = __stdlib_get_system_clock_ticks( ); // everything runs in one process!
return 0;
}
// ----------------------------------------------------------------------------
int _stat( char* file, struct stat* st )
// ----------------------------------------------------------------------------
{
( void )file;
( void )st;
st->st_mode = S_IFCHR;
return 0;
}
// ----------------------------------------------------------------------------
int _link( char* old, char* new )
// ----------------------------------------------------------------------------
{
( void )old;
( void )new;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EMLINK;
}
errno = EMLINK;
return -1;
}
// ----------------------------------------------------------------------------
int _fork( void )
// ----------------------------------------------------------------------------
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EAGAIN;
}
errno = EAGAIN;
return -1;
}
// ----------------------------------------------------------------------------
int _execve( char* name, char** argv, char** env )
// ----------------------------------------------------------------------------
{
( void )env;
( void )name;
( void )argv;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOMEM;
}
errno = ENOMEM;
return -1;
}
// ================================================================================================
// External routines required by newlib's malloc (sbrk/_sbrk, __malloc_lock/unlock)
// ================================================================================================
#if !defined(INC_FREERTOS_H)
// ----------------------------------------------------------------------------
caddr_t _sbrk( int incr )
// ----------------------------------------------------------------------------
{
register char* stack_ptr asm( "sp" );
extern char end asm( "end" );
static char* heap_end;
char* prev_heap_end;
if ( heap_end == 0 )
{
heap_end = &end;
}
prev_heap_end = heap_end;
if ( heap_end + incr > stack_ptr )
{
// write(1, "Heap and stack collision\n", 25);
// abort();
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOMEM;
}
errno = ENOMEM;
return ( caddr_t ) -1;
}
heap_end += incr;
return ( caddr_t ) prev_heap_end;
}
#else
static int heapBytesRemaining;
static unsigned int stickyHeapBytesRemaining;
uint32_t TotalHeapSize;
// ----------------------------------------------------------------------------
static UBaseType_t malLock_uxSavedInterruptStatus;
// ----------------------------------------------------------------------------
void* _sbrk_r( struct _reent* pReent, int incr )
// ----------------------------------------------------------------------------
{
( void )malLock_uxSavedInterruptStatus;
( void )pReent;
( void )incr;
register char* stack_ptr asm( "sp" );
// make sure to calculate the correct heap size and bytes remaining at the first call!
if( TotalHeapSize == 0 )
{
TotalHeapSize = heapBytesRemaining = stickyHeapBytesRemaining
= ( int )( ( &__HeapLimit ) - ( &__HeapBase ) )
#ifdef configISR_STACK_SIZE_WORDS
- ( configISR_STACK_SIZE_WORDS * 4 )
#endif
;
};
static char* currentHeapEnd = &__HeapBase;
char* limit = ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED ) ?
stack_ptr : // Before scheduler is started, limit is stack pointer (risky!)
&__HeapLimit
#ifdef configISR_STACK_SIZE_WORDS
- ( configISR_STACK_SIZE_WORDS * 4 )
#endif
; // Once running, OK to reuse all remaining RAM except ISR stack (MSP) stack
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
if ( currentHeapEnd + incr > limit )
{
// Ooops, no more memory available...
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{
extern void vApplicationMallocFailedHook( void );
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
vApplicationMallocFailedHook();
}
#elif defined(configHARD_STOP_ON_MALLOC_FAILURE)
// If you want to alert debugger or halt...
// WARNING: brkpt instruction may prevent watchdog operation...
while( 1 )
{
__asm( "bkpt #0" );
}; // Stop in GUI as if at a breakpoint (if debugging, otherwise loop forever)
#else
// Default, if you prefer to believe your application will gracefully trap out-of-memory...
pReent->_errno = ENOMEM; // newlib's thread-specific errno
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
#endif
return ( char* ) -1; // the malloc-family routine that called sbrk will return 0
}
char* previousHeapEnd = currentHeapEnd;
currentHeapEnd += incr;
heapBytesRemaining -= incr;
// implement the statistical feature to provide the minimum free heap size feature
// of FreeRTOS statistics
if ( stickyHeapBytesRemaining > xPortGetFreeHeapSize() )
{
stickyHeapBytesRemaining = xPortGetFreeHeapSize();
}
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
return ( char* ) previousHeapEnd;
}
/*! \brief non-reentrant sbrk uses is actually reentrant by using current context
* because the current _reent structure is pointed to by global _impure_ptr
*/
// ----------------------------------------------------------------------------
void* sbrk( ptrdiff_t __incr )
// ----------------------------------------------------------------------------
{
return _sbrk_r( _impure_ptr, __incr );
}
//! _sbrk is a synonym for sbrk.
// ----------------------------------------------------------------------------
char* _sbrk( int incr )
// ----------------------------------------------------------------------------
{
return sbrk( incr );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __malloc_lock( struct _reent* r )
// ----------------------------------------------------------------------------
{
( void )r;
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( mallocSemaphore, -1 );
}
#endif
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __malloc_unlock( struct _reent* r )
// ----------------------------------------------------------------------------
{
( void )r;
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreGiveRecursive( mallocSemaphore );
}
#endif
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __env_lock( void )
// ----------------------------------------------------------------------------
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( envSemaphore, -1 );
}
#endif
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __env_unlock( void )
// ----------------------------------------------------------------------------
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreGiveRecursive( envSemaphore );
}
#endif
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
void* pvPortMalloc( size_t xSize )
// ----------------------------------------------------------------------------
{
void* p = malloc( xSize );
return p;
}
// ----------------------------------------------------------------------------
void vPortFree( void* pv )
// ----------------------------------------------------------------------------
{
free( pv );
}
// ----------------------------------------------------------------------------
size_t xPortGetFreeHeapSize( void )
// ----------------------------------------------------------------------------
{
static int lockGuard = 0;
if ( lockGuard != 0 ) return stickyHeapBytesRemaining;
lockGuard = 1;
struct mallinfo mi = mallinfo();
size_t result = mi.fordblks + heapBytesRemaining;
lockGuard = 0;
return result;
}
// ----------------------------------------------------------------------------
size_t xPortGetMinimumEverFreeHeapSize ( void )
// ----------------------------------------------------------------------------
{
return stickyHeapBytesRemaining;
}
//! No implementation needed, but stub provided in case application already calls vPortInitialiseBlocks
// ----------------------------------------------------------------------------
void vPortInitialiseBlocks( void )
// ----------------------------------------------------------------------------
{
return;
}
#endif
@@ -0,0 +1,333 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_hal_msp.c
* @brief This file provides code for the MSP Initialization
* and de-Initialization codes.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN Macro */
/* USER CODE END Macro */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* External functions --------------------------------------------------------*/
/* USER CODE BEGIN ExternalFunctions */
/* USER CODE END ExternalFunctions */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
/* System interrupt init*/
/* Peripheral interrupt init */
/* CM4_SEV_IRQn interrupt configuration */
HAL_NVIC_SetPriority(CM4_SEV_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(CM4_SEV_IRQn);
/* HSEM1_IRQn interrupt configuration */
HAL_NVIC_SetPriority(HSEM1_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(HSEM1_IRQn);
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
/**
* @brief SPI MSP Initialization
* This function configures the hardware resources used in this example
* @param hspi: SPI handle pointer
* @retval None
*/
void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(hspi->Instance==SPI1)
{
/* USER CODE BEGIN SPI1_MspInit 0 */
/* USER CODE END SPI1_MspInit 0 */
/** Initializes the peripherals clock
*/
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI1;
PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
/* Peripheral clock enable */
__HAL_RCC_SPI1_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**SPI1 GPIO Configuration
PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO
PB5 ------> SPI1_MOSI
*/
GPIO_InitStruct.Pin = STEP_SPI_SCK_Pin|STEP_SPI_MISO_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = STEP_SPI_MOSI_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(STEP_SPI_MOSI_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN SPI1_MspInit 1 */
/* USER CODE END SPI1_MspInit 1 */
}
}
/**
* @brief SPI MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hspi: SPI handle pointer
* @retval None
*/
void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
{
if(hspi->Instance==SPI1)
{
/* USER CODE BEGIN SPI1_MspDeInit 0 */
/* USER CODE END SPI1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_SPI1_CLK_DISABLE();
/**SPI1 GPIO Configuration
PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO
PB5 ------> SPI1_MOSI
*/
HAL_GPIO_DeInit(GPIOA, STEP_SPI_SCK_Pin|STEP_SPI_MISO_Pin);
HAL_GPIO_DeInit(STEP_SPI_MOSI_GPIO_Port, STEP_SPI_MOSI_Pin);
/* USER CODE BEGIN SPI1_MspDeInit 1 */
/* USER CODE END SPI1_MspDeInit 1 */
}
}
/**
* @brief TIM_Base MSP Initialization
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspInit 0 */
/* USER CODE END TIM2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM2_CLK_ENABLE();
/* USER CODE BEGIN TIM2_MspInit 1 */
/* USER CODE END TIM2_MspInit 1 */
}
}
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(htim->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspPostInit 0 */
/* USER CODE END TIM2_MspPostInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
/**TIM2 GPIO Configuration
PB10 ------> TIM2_CH3
PB11 ------> TIM2_CH4
*/
GPIO_InitStruct.Pin = SPINDLE_PWM_L_Pin|SPINDLE_PWM_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN TIM2_MspPostInit 1 */
/* USER CODE END TIM2_MspPostInit 1 */
}
}
/**
* @brief TIM_Base MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspDeInit 0 */
/* USER CODE END TIM2_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM2_CLK_DISABLE();
/* USER CODE BEGIN TIM2_MspDeInit 1 */
/* USER CODE END TIM2_MspDeInit 1 */
}
}
/**
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(huart->Instance==USART3)
{
/* USER CODE BEGIN USART3_MspInit 0 */
/* USER CODE END USART3_MspInit 0 */
/** Initializes the peripherals clock
*/
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3;
PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
/* Peripheral clock enable */
__HAL_RCC_USART3_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
/**USART3 GPIO Configuration
PD8 ------> USART3_TX
PD9 ------> USART3_RX
*/
GPIO_InitStruct.Pin = DEBUG_UART_TX_Pin|DEBUG_UART_RX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/* USART3 interrupt Init */
HAL_NVIC_SetPriority(USART3_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(USART3_IRQn);
/* USER CODE BEGIN USART3_MspInit 1 */
/* USER CODE END USART3_MspInit 1 */
}
}
/**
* @brief UART MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
{
if(huart->Instance==USART3)
{
/* USER CODE BEGIN USART3_MspDeInit 0 */
/* USER CODE END USART3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART3_CLK_DISABLE();
/**USART3 GPIO Configuration
PD8 ------> USART3_TX
PD9 ------> USART3_RX
*/
HAL_GPIO_DeInit(GPIOD, DEBUG_UART_TX_Pin|DEBUG_UART_RX_Pin);
/* USART3 interrupt DeInit */
HAL_NVIC_DisableIRQ(USART3_IRQn);
/* USER CODE BEGIN USART3_MspDeInit 1 */
/* USER CODE END USART3_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
@@ -0,0 +1,256 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32h7xx_it.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
extern UART_HandleTypeDef huart3;
/* USER CODE BEGIN EV */
/* USER CODE END EV */
/******************************************************************************/
/* Cortex Processor Interruption and Exception Handlers */
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
{
}
/* USER CODE END NonMaskableInt_IRQn 1 */
}
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_HardFault_IRQn 0 */
/* USER CODE END W1_HardFault_IRQn 0 */
}
}
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
/* USER CODE END W1_MemoryManagement_IRQn 0 */
}
}
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_BusFault_IRQn 0 */
/* USER CODE END W1_BusFault_IRQn 0 */
}
}
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_UsageFault_IRQn 0 */
}
}
#if 0
/* USER CODE END W1_UsageFault_IRQn 0 */
}
}
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
/* USER CODE BEGIN SVCall_IRQn 0 */
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
/* USER CODE BEGIN DebugMonitor_IRQn 0 */
#endif
void DebugMon_Handler(void)
{
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
}
#if 0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
/* USER CODE BEGIN PendSV_IRQn 0 */
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */
#endif
void SysTick_Handler(void)
{
extern void xPortSysTickHandler( void );
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */
xPortSysTickHandler();
/* USER CODE END SysTick_IRQn 1 */
}
/******************************************************************************/
/* STM32H7xx Peripheral Interrupt Handlers */
/* Add here the Interrupt Handlers for the used peripherals. */
/* For the available peripheral interrupt handler names, */
/* please refer to the startup file (startup_stm32h7xx.s). */
/******************************************************************************/
/**
* @brief This function handles USART3 global interrupt.
*/
void USART3_IRQHandler(void)
{
/* USER CODE BEGIN USART3_IRQn 0 */
/* USER CODE END USART3_IRQn 0 */
HAL_UART_IRQHandler(&huart3);
/* USER CODE BEGIN USART3_IRQn 1 */
/* USER CODE END USART3_IRQn 1 */
}
/**
* @brief This function handles CM4 send event interrupt for CM7.
*/
void CM4_SEV_IRQHandler(void)
{
/* USER CODE BEGIN CM4_SEV_IRQn 0 */
/* USER CODE END CM4_SEV_IRQn 0 */
/* USER CODE BEGIN CM4_SEV_IRQn 1 */
/* USER CODE END CM4_SEV_IRQn 1 */
}
/**
* @brief This function handles HSEM1 global interrupt.
*/
void HSEM1_IRQHandler(void)
{
/* USER CODE BEGIN HSEM1_IRQn 0 */
/* USER CODE END HSEM1_IRQn 0 */
HAL_HSEM_IRQHandler();
/* USER CODE BEGIN HSEM1_IRQn 1 */
/* USER CODE END HSEM1_IRQn 1 */
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
@@ -0,0 +1,176 @@
/**
******************************************************************************
* @file syscalls.c
* @author Auto-generated by STM32CubeIDE
* @brief STM32CubeIDE Minimal System calls file
*
* For more information about which c-functions
* need which of these lowlevel functions
* please consult the Newlib libc-manual
******************************************************************************
* @attention
*
* Copyright (c) 2020-2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes */
#include <sys/stat.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
/* Variables */
extern int __io_putchar(int ch) __attribute__((weak));
extern int __io_getchar(void) __attribute__((weak));
char *__env[1] = { 0 };
char **environ = __env;
/* Functions */
void initialise_monitor_handles()
{
}
int _getpid(void)
{
return 1;
}
int _kill(int pid, int sig)
{
(void)pid;
(void)sig;
errno = EINVAL;
return -1;
}
void _exit (int status)
{
_kill(status, -1);
while (1) {} /* Make sure we hang here */
}
__attribute__((weak)) int _read(int file, char *ptr, int len)
{
(void)file;
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
*ptr++ = __io_getchar();
}
return len;
}
__attribute__((weak)) int _write(int file, char *ptr, int len)
{
(void)file;
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
__io_putchar(*ptr++);
}
return len;
}
int _close(int file)
{
(void)file;
return -1;
}
int _fstat(int file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _isatty(int file)
{
(void)file;
return 1;
}
int _lseek(int file, int ptr, int dir)
{
(void)file;
(void)ptr;
(void)dir;
return 0;
}
int _open(char *path, int flags, ...)
{
(void)path;
(void)flags;
/* Pretend like we always fail */
return -1;
}
int _wait(int *status)
{
(void)status;
errno = ECHILD;
return -1;
}
int _unlink(char *name)
{
(void)name;
errno = ENOENT;
return -1;
}
int _times(struct tms *buf)
{
(void)buf;
return -1;
}
int _stat(char *file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _link(char *old, char *new)
{
(void)old;
(void)new;
errno = EMLINK;
return -1;
}
int _fork(void)
{
errno = EAGAIN;
return -1;
}
int _execve(char *name, char **argv, char **env)
{
(void)name;
(void)argv;
(void)env;
errno = ENOMEM;
return -1;
}
@@ -0,0 +1,79 @@
/**
******************************************************************************
* @file sysmem.c
* @author Generated by STM32CubeIDE
* @brief STM32CubeIDE System Memory calls file
*
* For more information about which C functions
* need which of these lowlevel functions
* please consult the newlib libc manual
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes */
#include <errno.h>
#include <stdint.h>
/**
* Pointer to the current high watermark of the heap usage
*/
static uint8_t *__sbrk_heap_end = NULL;
/**
* @brief _sbrk() allocates memory to the newlib heap and is used by malloc
* and others from the C library
*
* @verbatim
* ############################################################################
* # .data # .bss # newlib heap # MSP stack #
* # # # # Reserved by _Min_Stack_Size #
* ############################################################################
* ^-- RAM start ^-- _end _estack, RAM end --^
* @endverbatim
*
* This implementation starts allocating at the '_end' linker symbol
* The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
* The implementation considers '_estack' linker symbol to be RAM end
* NOTE: If the MSP stack, at any point during execution, grows larger than the
* reserved size, please increase the '_Min_Stack_Size'.
*
* @param incr Memory size
* @return Pointer to allocated memory
*/
void *_sbrk(ptrdiff_t incr)
{
extern uint8_t _end; /* Symbol defined in the linker script */
extern uint8_t _estack; /* Symbol defined in the linker script */
extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
const uint8_t *max_heap = (uint8_t *)stack_limit;
uint8_t *prev_heap_end;
/* Initialize heap end at first call */
if (NULL == __sbrk_heap_end)
{
__sbrk_heap_end = &_end;
}
/* Protect heap from growing into the reserved MSP stack */
if (__sbrk_heap_end + incr > max_heap)
{
errno = ENOMEM;
return (void *)-1;
}
prev_heap_end = __sbrk_heap_end;
__sbrk_heap_end += incr;
return (void *)prev_heap_end;
}
@@ -0,0 +1,768 @@
/**
******************************************************************************
* @file startup_stm32h755xx.s
* @author MCD Application Team
* @brief STM32H755xx Devices vector table for GCC based toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
******************************************************************************
* @attention
*
* Copyright (c) 2019 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
.syntax unified
.cpu cortex-m7
.fpu softvfp
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
/* Call the clock system initialization function.*/
bl SystemInit
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss
FillZerobss:
str r3, [r2]
adds r2, r2, #4
LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bx lr
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******************************************************************************
*
* The minimal vector table for a Cortex M. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
*******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
/* External Interrupts */
.word WWDG_IRQHandler /* Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */
.word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
.word FLASH_IRQHandler /* FLASH */
.word RCC_IRQHandler /* RCC */
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
.word EXTI3_IRQHandler /* EXTI Line3 */
.word EXTI4_IRQHandler /* EXTI Line4 */
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
.word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */
.word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */
.word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */
.word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
.word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */
.word TIM1_UP_IRQHandler /* TIM1 Update interrupt */
.word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
.word TIM2_IRQHandler /* TIM2 */
.word TIM3_IRQHandler /* TIM3 */
.word TIM4_IRQHandler /* TIM4 */
.word I2C1_EV_IRQHandler /* I2C1 Event */
.word I2C1_ER_IRQHandler /* I2C1 Error */
.word I2C2_EV_IRQHandler /* I2C2 Event */
.word I2C2_ER_IRQHandler /* I2C2 Error */
.word SPI1_IRQHandler /* SPI1 */
.word SPI2_IRQHandler /* SPI2 */
.word USART1_IRQHandler /* USART1 */
.word USART2_IRQHandler /* USART2 */
.word USART3_IRQHandler /* USART3 */
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
.word 0 /* Reserved */
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
.word FMC_IRQHandler /* FMC */
.word SDMMC1_IRQHandler /* SDMMC1 */
.word TIM5_IRQHandler /* TIM5 */
.word SPI3_IRQHandler /* SPI3 */
.word UART4_IRQHandler /* UART4 */
.word UART5_IRQHandler /* UART5 */
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
.word TIM7_IRQHandler /* TIM7 */
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
.word ETH_IRQHandler /* Ethernet */
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
.word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt */
.word CM7_SEV_IRQHandler /* CM7 Send event interrupt for CM4 */
.word CM4_SEV_IRQHandler /* CM4 Send event interrupt for CM7 */
.word 0 /* Reserved */
.word 0 /* Reserved */
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
.word USART6_IRQHandler /* USART6 */
.word I2C3_EV_IRQHandler /* I2C3 event */
.word I2C3_ER_IRQHandler /* I2C3 error */
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
.word OTG_HS_IRQHandler /* USB OTG HS */
.word DCMI_IRQHandler /* DCMI */
.word CRYP_IRQHandler /* Crypto */
.word HASH_RNG_IRQHandler /* Hash and Rng */
.word FPU_IRQHandler /* FPU */
.word UART7_IRQHandler /* UART7 */
.word UART8_IRQHandler /* UART8 */
.word SPI4_IRQHandler /* SPI4 */
.word SPI5_IRQHandler /* SPI5 */
.word SPI6_IRQHandler /* SPI6 */
.word SAI1_IRQHandler /* SAI1 */
.word LTDC_IRQHandler /* LTDC */
.word LTDC_ER_IRQHandler /* LTDC error */
.word DMA2D_IRQHandler /* DMA2D */
.word SAI2_IRQHandler /* SAI2 */
.word QUADSPI_IRQHandler /* QUADSPI */
.word LPTIM1_IRQHandler /* LPTIM1 */
.word CEC_IRQHandler /* HDMI_CEC */
.word I2C4_EV_IRQHandler /* I2C4 Event */
.word I2C4_ER_IRQHandler /* I2C4 Error */
.word SPDIF_RX_IRQHandler /* SPDIF_RX */
.word OTG_FS_EP1_OUT_IRQHandler /* USB OTG FS End Point 1 Out */
.word OTG_FS_EP1_IN_IRQHandler /* USB OTG FS End Point 1 In */
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI */
.word OTG_FS_IRQHandler /* USB OTG FS */
.word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */
.word HRTIM1_Master_IRQHandler /* HRTIM Master Timer global Interrupt */
.word HRTIM1_TIMA_IRQHandler /* HRTIM Timer A global Interrupt */
.word HRTIM1_TIMB_IRQHandler /* HRTIM Timer B global Interrupt */
.word HRTIM1_TIMC_IRQHandler /* HRTIM Timer C global Interrupt */
.word HRTIM1_TIMD_IRQHandler /* HRTIM Timer D global Interrupt */
.word HRTIM1_TIME_IRQHandler /* HRTIM Timer E global Interrupt */
.word HRTIM1_FLT_IRQHandler /* HRTIM Fault global Interrupt */
.word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */
.word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */
.word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */
.word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */
.word SAI3_IRQHandler /* SAI3 global Interrupt */
.word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */
.word TIM15_IRQHandler /* TIM15 global Interrupt */
.word TIM16_IRQHandler /* TIM16 global Interrupt */
.word TIM17_IRQHandler /* TIM17 global Interrupt */
.word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */
.word MDIOS_IRQHandler /* MDIOS global Interrupt */
.word JPEG_IRQHandler /* JPEG global Interrupt */
.word MDMA_IRQHandler /* MDMA global Interrupt */
.word 0 /* Reserved */
.word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */
.word HSEM1_IRQHandler /* HSEM1 global Interrupt */
.word HSEM2_IRQHandler /* HSEM1 global Interrupt */
.word ADC3_IRQHandler /* ADC3 global Interrupt */
.word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */
.word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */
.word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */
.word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */
.word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */
.word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */
.word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */
.word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */
.word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */
.word COMP1_IRQHandler /* COMP1 global Interrupt */
.word LPTIM2_IRQHandler /* LP TIM2 global interrupt */
.word LPTIM3_IRQHandler /* LP TIM3 global interrupt */
.word LPTIM4_IRQHandler /* LP TIM4 global interrupt */
.word LPTIM5_IRQHandler /* LP TIM5 global interrupt */
.word LPUART1_IRQHandler /* LP UART1 interrupt */
.word WWDG_RST_IRQHandler /* Window Watchdog reset interrupt (exti_d2_wwdg_it, exti_d1_wwdg_it) */
.word CRS_IRQHandler /* Clock Recovery Global Interrupt */
.word ECC_IRQHandler /* ECC diagnostic Global Interrupt */
.word SAI4_IRQHandler /* SAI4 global interrupt */
.word 0 /* Reserved */
.word HOLD_CORE_IRQHandler /* Hold core interrupt */
.word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */
.size g_pfnVectors, .-g_pfnVectors
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******************************************************************************/
.weak NMI_Handler
.thumb_set NMI_Handler,Default_Handler
.weak HardFault_Handler
.thumb_set HardFault_Handler,Default_Handler
.weak MemManage_Handler
.thumb_set MemManage_Handler,Default_Handler
.weak BusFault_Handler
.thumb_set BusFault_Handler,Default_Handler
.weak UsageFault_Handler
.thumb_set UsageFault_Handler,Default_Handler
.weak SVC_Handler
.thumb_set SVC_Handler,Default_Handler
.weak DebugMon_Handler
.thumb_set DebugMon_Handler,Default_Handler
.weak PendSV_Handler
.thumb_set PendSV_Handler,Default_Handler
.weak SysTick_Handler
.thumb_set SysTick_Handler,Default_Handler
.weak WWDG_IRQHandler
.thumb_set WWDG_IRQHandler,Default_Handler
.weak PVD_AVD_IRQHandler
.thumb_set PVD_AVD_IRQHandler,Default_Handler
.weak TAMP_STAMP_IRQHandler
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
.weak RTC_WKUP_IRQHandler
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
.weak FLASH_IRQHandler
.thumb_set FLASH_IRQHandler,Default_Handler
.weak RCC_IRQHandler
.thumb_set RCC_IRQHandler,Default_Handler
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandler,Default_Handler
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandler,Default_Handler
.weak EXTI2_IRQHandler
.thumb_set EXTI2_IRQHandler,Default_Handler
.weak EXTI3_IRQHandler
.thumb_set EXTI3_IRQHandler,Default_Handler
.weak EXTI4_IRQHandler
.thumb_set EXTI4_IRQHandler,Default_Handler
.weak DMA1_Stream0_IRQHandler
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
.weak DMA1_Stream1_IRQHandler
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
.weak DMA1_Stream2_IRQHandler
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
.weak DMA1_Stream3_IRQHandler
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
.weak DMA1_Stream4_IRQHandler
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
.weak DMA1_Stream5_IRQHandler
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
.weak DMA1_Stream6_IRQHandler
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
.weak ADC_IRQHandler
.thumb_set ADC_IRQHandler,Default_Handler
.weak FDCAN1_IT0_IRQHandler
.thumb_set FDCAN1_IT0_IRQHandler,Default_Handler
.weak FDCAN2_IT0_IRQHandler
.thumb_set FDCAN2_IT0_IRQHandler,Default_Handler
.weak FDCAN1_IT1_IRQHandler
.thumb_set FDCAN1_IT1_IRQHandler,Default_Handler
.weak FDCAN2_IT1_IRQHandler
.thumb_set FDCAN2_IT1_IRQHandler,Default_Handler
.weak EXTI9_5_IRQHandler
.thumb_set EXTI9_5_IRQHandler,Default_Handler
.weak TIM1_BRK_IRQHandler
.thumb_set TIM1_BRK_IRQHandler,Default_Handler
.weak TIM1_UP_IRQHandler
.thumb_set TIM1_UP_IRQHandler,Default_Handler
.weak TIM1_TRG_COM_IRQHandler
.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
.weak TIM1_CC_IRQHandler
.thumb_set TIM1_CC_IRQHandler,Default_Handler
.weak TIM2_IRQHandler
.thumb_set TIM2_IRQHandler,Default_Handler
.weak TIM3_IRQHandler
.thumb_set TIM3_IRQHandler,Default_Handler
.weak TIM4_IRQHandler
.thumb_set TIM4_IRQHandler,Default_Handler
.weak I2C1_EV_IRQHandler
.thumb_set I2C1_EV_IRQHandler,Default_Handler
.weak I2C1_ER_IRQHandler
.thumb_set I2C1_ER_IRQHandler,Default_Handler
.weak I2C2_EV_IRQHandler
.thumb_set I2C2_EV_IRQHandler,Default_Handler
.weak I2C2_ER_IRQHandler
.thumb_set I2C2_ER_IRQHandler,Default_Handler
.weak SPI1_IRQHandler
.thumb_set SPI1_IRQHandler,Default_Handler
.weak SPI2_IRQHandler
.thumb_set SPI2_IRQHandler,Default_Handler
.weak USART1_IRQHandler
.thumb_set USART1_IRQHandler,Default_Handler
.weak USART2_IRQHandler
.thumb_set USART2_IRQHandler,Default_Handler
.weak USART3_IRQHandler
.thumb_set USART3_IRQHandler,Default_Handler
.weak EXTI15_10_IRQHandler
.thumb_set EXTI15_10_IRQHandler,Default_Handler
.weak RTC_Alarm_IRQHandler
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
.weak TIM8_BRK_TIM12_IRQHandler
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
.weak TIM8_UP_TIM13_IRQHandler
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
.weak TIM8_TRG_COM_TIM14_IRQHandler
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
.weak TIM8_CC_IRQHandler
.thumb_set TIM8_CC_IRQHandler,Default_Handler
.weak DMA1_Stream7_IRQHandler
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
.weak FMC_IRQHandler
.thumb_set FMC_IRQHandler,Default_Handler
.weak SDMMC1_IRQHandler
.thumb_set SDMMC1_IRQHandler,Default_Handler
.weak TIM5_IRQHandler
.thumb_set TIM5_IRQHandler,Default_Handler
.weak SPI3_IRQHandler
.thumb_set SPI3_IRQHandler,Default_Handler
.weak UART4_IRQHandler
.thumb_set UART4_IRQHandler,Default_Handler
.weak UART5_IRQHandler
.thumb_set UART5_IRQHandler,Default_Handler
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
.weak TIM7_IRQHandler
.thumb_set TIM7_IRQHandler,Default_Handler
.weak DMA2_Stream0_IRQHandler
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
.weak DMA2_Stream1_IRQHandler
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
.weak DMA2_Stream2_IRQHandler
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
.weak DMA2_Stream3_IRQHandler
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
.weak DMA2_Stream4_IRQHandler
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
.weak ETH_IRQHandler
.thumb_set ETH_IRQHandler,Default_Handler
.weak ETH_WKUP_IRQHandler
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
.weak FDCAN_CAL_IRQHandler
.thumb_set FDCAN_CAL_IRQHandler,Default_Handler
.weak CM7_SEV_IRQHandler
.thumb_set CM7_SEV_IRQHandler,Default_Handler
.weak CM4_SEV_IRQHandler
.thumb_set CM4_SEV_IRQHandler,Default_Handler
.weak DMA2_Stream5_IRQHandler
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
.weak DMA2_Stream6_IRQHandler
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
.weak DMA2_Stream7_IRQHandler
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
.weak USART6_IRQHandler
.thumb_set USART6_IRQHandler,Default_Handler
.weak I2C3_EV_IRQHandler
.thumb_set I2C3_EV_IRQHandler,Default_Handler
.weak I2C3_ER_IRQHandler
.thumb_set I2C3_ER_IRQHandler,Default_Handler
.weak OTG_HS_EP1_OUT_IRQHandler
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_HS_EP1_IN_IRQHandler
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_HS_WKUP_IRQHandler
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
.weak OTG_HS_IRQHandler
.thumb_set OTG_HS_IRQHandler,Default_Handler
.weak DCMI_IRQHandler
.thumb_set DCMI_IRQHandler,Default_Handler
.weak CRYP_IRQHandler
.thumb_set CRYP_IRQHandler,Default_Handler
.weak HASH_RNG_IRQHandler
.thumb_set HASH_RNG_IRQHandler,Default_Handler
.weak FPU_IRQHandler
.thumb_set FPU_IRQHandler,Default_Handler
.weak UART7_IRQHandler
.thumb_set UART7_IRQHandler,Default_Handler
.weak UART8_IRQHandler
.thumb_set UART8_IRQHandler,Default_Handler
.weak SPI4_IRQHandler
.thumb_set SPI4_IRQHandler,Default_Handler
.weak SPI5_IRQHandler
.thumb_set SPI5_IRQHandler,Default_Handler
.weak SPI6_IRQHandler
.thumb_set SPI6_IRQHandler,Default_Handler
.weak SAI1_IRQHandler
.thumb_set SAI1_IRQHandler,Default_Handler
.weak LTDC_IRQHandler
.thumb_set LTDC_IRQHandler,Default_Handler
.weak LTDC_ER_IRQHandler
.thumb_set LTDC_ER_IRQHandler,Default_Handler
.weak DMA2D_IRQHandler
.thumb_set DMA2D_IRQHandler,Default_Handler
.weak SAI2_IRQHandler
.thumb_set SAI2_IRQHandler,Default_Handler
.weak QUADSPI_IRQHandler
.thumb_set QUADSPI_IRQHandler,Default_Handler
.weak LPTIM1_IRQHandler
.thumb_set LPTIM1_IRQHandler,Default_Handler
.weak CEC_IRQHandler
.thumb_set CEC_IRQHandler,Default_Handler
.weak I2C4_EV_IRQHandler
.thumb_set I2C4_EV_IRQHandler,Default_Handler
.weak I2C4_ER_IRQHandler
.thumb_set I2C4_ER_IRQHandler,Default_Handler
.weak SPDIF_RX_IRQHandler
.thumb_set SPDIF_RX_IRQHandler,Default_Handler
.weak OTG_FS_EP1_OUT_IRQHandler
.thumb_set OTG_FS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_FS_EP1_IN_IRQHandler
.thumb_set OTG_FS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_FS_WKUP_IRQHandler
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
.weak OTG_FS_IRQHandler
.thumb_set OTG_FS_IRQHandler,Default_Handler
.weak DMAMUX1_OVR_IRQHandler
.thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler
.weak HRTIM1_Master_IRQHandler
.thumb_set HRTIM1_Master_IRQHandler,Default_Handler
.weak HRTIM1_TIMA_IRQHandler
.thumb_set HRTIM1_TIMA_IRQHandler,Default_Handler
.weak HRTIM1_TIMB_IRQHandler
.thumb_set HRTIM1_TIMB_IRQHandler,Default_Handler
.weak HRTIM1_TIMC_IRQHandler
.thumb_set HRTIM1_TIMC_IRQHandler,Default_Handler
.weak HRTIM1_TIMD_IRQHandler
.thumb_set HRTIM1_TIMD_IRQHandler,Default_Handler
.weak HRTIM1_TIME_IRQHandler
.thumb_set HRTIM1_TIME_IRQHandler,Default_Handler
.weak HRTIM1_FLT_IRQHandler
.thumb_set HRTIM1_FLT_IRQHandler,Default_Handler
.weak DFSDM1_FLT0_IRQHandler
.thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler
.weak DFSDM1_FLT1_IRQHandler
.thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler
.weak DFSDM1_FLT2_IRQHandler
.thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler
.weak DFSDM1_FLT3_IRQHandler
.thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler
.weak SAI3_IRQHandler
.thumb_set SAI3_IRQHandler,Default_Handler
.weak SWPMI1_IRQHandler
.thumb_set SWPMI1_IRQHandler,Default_Handler
.weak TIM15_IRQHandler
.thumb_set TIM15_IRQHandler,Default_Handler
.weak TIM16_IRQHandler
.thumb_set TIM16_IRQHandler,Default_Handler
.weak TIM17_IRQHandler
.thumb_set TIM17_IRQHandler,Default_Handler
.weak MDIOS_WKUP_IRQHandler
.thumb_set MDIOS_WKUP_IRQHandler,Default_Handler
.weak MDIOS_IRQHandler
.thumb_set MDIOS_IRQHandler,Default_Handler
.weak JPEG_IRQHandler
.thumb_set JPEG_IRQHandler,Default_Handler
.weak MDMA_IRQHandler
.thumb_set MDMA_IRQHandler,Default_Handler
.weak SDMMC2_IRQHandler
.thumb_set SDMMC2_IRQHandler,Default_Handler
.weak HSEM1_IRQHandler
.thumb_set HSEM1_IRQHandler,Default_Handler
.weak HSEM2_IRQHandler
.thumb_set HSEM2_IRQHandler,Default_Handler
.weak ADC3_IRQHandler
.thumb_set ADC3_IRQHandler,Default_Handler
.weak DMAMUX2_OVR_IRQHandler
.thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler
.weak BDMA_Channel0_IRQHandler
.thumb_set BDMA_Channel0_IRQHandler,Default_Handler
.weak BDMA_Channel1_IRQHandler
.thumb_set BDMA_Channel1_IRQHandler,Default_Handler
.weak BDMA_Channel2_IRQHandler
.thumb_set BDMA_Channel2_IRQHandler,Default_Handler
.weak BDMA_Channel3_IRQHandler
.thumb_set BDMA_Channel3_IRQHandler,Default_Handler
.weak BDMA_Channel4_IRQHandler
.thumb_set BDMA_Channel4_IRQHandler,Default_Handler
.weak BDMA_Channel5_IRQHandler
.thumb_set BDMA_Channel5_IRQHandler,Default_Handler
.weak BDMA_Channel6_IRQHandler
.thumb_set BDMA_Channel6_IRQHandler,Default_Handler
.weak BDMA_Channel7_IRQHandler
.thumb_set BDMA_Channel7_IRQHandler,Default_Handler
.weak COMP1_IRQHandler
.thumb_set COMP1_IRQHandler,Default_Handler
.weak LPTIM2_IRQHandler
.thumb_set LPTIM2_IRQHandler,Default_Handler
.weak LPTIM3_IRQHandler
.thumb_set LPTIM3_IRQHandler,Default_Handler
.weak LPTIM4_IRQHandler
.thumb_set LPTIM4_IRQHandler,Default_Handler
.weak LPTIM5_IRQHandler
.thumb_set LPTIM5_IRQHandler,Default_Handler
.weak LPUART1_IRQHandler
.thumb_set LPUART1_IRQHandler,Default_Handler
.weak WWDG_RST_IRQHandler
.thumb_set WWDG_RST_IRQHandler,Default_Handler
.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler
.weak ECC_IRQHandler
.thumb_set ECC_IRQHandler,Default_Handler
.weak SAI4_IRQHandler
.thumb_set SAI4_IRQHandler,Default_Handler
.weak HOLD_CORE_IRQHandler
.thumb_set HOLD_CORE_IRQHandler,Default_Handler
.weak WAKEUP_PIN_IRQHandler
.thumb_set WAKEUP_PIN_IRQHandler,Default_Handler
Whitespace-only changes.
+205
View File
@@ -0,0 +1,205 @@
##########################################################################################################################
# Author: Thorsten Kimmel
# Project: DHBW-Embedded-Systems-TES
##########################################################################################################################
# ------------------------------------------------
# Generic Makefile (based on gcc)
#
# ChangeLog :
# 2026-09-25 - first version
# ------------------------------------------------
######################################
# target
######################################
TARGET = Stepper-H7-CM7
MK_CORE := M7
LDFLAGS :=
CFLAGS :=
C_SOURCES :=
C_INCLUDES :=
ASM_SOURCES :=
C_DEFS :=
AS_DEFS :=
# cpu
CPU = -mcpu=cortex-m7
#######################################
# additional common includes
#######################################
include ../common.mk
######################################
# building variables
######################################
# debug build? 1 = -g, 2 = -g3
DEBUG = 2
# optimization
OPT = -O0
# stack size limit of single function (warning)
SLIMIT = 2048
#######################################
# paths
#######################################
# Build path
BUILD_DIR = build
######################################
# source
######################################
# C sources
C_SOURCES += Core/Src/main.c \
Core/Src/newlib_abs.c \
Core/Src/stm32h7xx_hal_msp.c \
Core/Src/stm32h7xx_it.c \
$(wildcard Core/Src/Console/*.c) \
$(wildcard Core/Src/IPC/*.c) \
$(wildcard Core/Src/Spindle/*.c) \
$(wildcard Core/Src/Stepper/*.c) \
$(wildcard OPENAMP/*.c) \
# ASM sources
ASM_SOURCES += Core/Startup/startup_stm32h755zitx.s
#######################################
# CFLAGS
#######################################
# fpu
# NONE for Cortex-M0/M0+/M3
# float-abi
FPU = -mfpu=fpv5-d16
FLOAT-ABI = -mfloat-abi=hard
# mcu
MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
# macros for gcc
# AS defines
AS_DEFS +=
# C defines
C_DEFS += -DCORE_CM7 \
-DDEBUG \
-DVIRTIO_MASTER_ONLY
# AS includes
AS_INCLUDES +=
# C includes
C_INCLUDES += -ICore/Inc \
-ICore/Inc/Console \
-ICore/Inc/IPC \
-ICore/Inc/Spindle \
-ICore/Inc/Stepper \
-IOPENAMP
# compile gcc flags
ASFLAGS += $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -fstack-usage -Wstack-usage=$(SLIMIT) -Wno-unused-parameter -Wall -Wextra -Wundef -Wshadow -fno-common -fdata-sections -ffunction-sections
CFLAGS += $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -fstack-usage -Wstack-usage=$(SLIMIT) -Wno-unused-parameter -Wall -Wextra -Wundef -Wshadow -fno-common -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2
endif
ifeq ($(DEBUG), 2)
CFLAGS += -g3 -gdwarf-2
endif
ifeq ($(OS),Windows_NT)
EXEPOSTFIX = .exe
else
EXEPOSTFIX =
endif
#######################################
# LDFLAGS
#######################################
# link script
LDSCRIPT = STM32H755ZITX_FLASH.ld
# libraries
LIBS = -lc -lm -lnosys
LIBDIR =
# -specs=nano.specs
LDFLAGS += -lc -lrdimon -u _printf_float -Wa,-adhln -g $(MCU) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref,--gc-sections
# default action: build all
.PHONY: all
all: $(BUILD_DIR)/$(TARGET).elf #$(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin $(BUILD_DIR)/$(TARGET).S
#######################################
# build the application
#######################################
# list of objects
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
vpath %.c $(sort $(dir $(C_SOURCES)))
# list of ASM program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
vpath %.s $(sort $(dir $(ASM_SOURCES)))
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
@echo " $(MK_CORE)-CC $<"
@$(CC)$(EXEPOSTFIX) -c $(CFLAGS) -MMD -MP -MF"$(@:%.o=%.d)" $< -o $@
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
@echo " $(MK_CORE)-AS $<"
@$(AS)$(EXEPOSTFIX) -c $(CFLAGS) $< -o $@
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
@echo " $(MK_CORE)-ELF $(BUILD_DIR)/$(TARGET).elf"
@$(CC)$(EXEPOSTFIX) $(OBJECTS) $(LDFLAGS) -o $@
@$(SZ)$(EXEPOSTFIX) $@
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
@$(HEX)$(EXEPOSTFIX) $< $@
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
@$(BIN)$(EXEPOSTFIX) $< $@
$(BUILD_DIR)/%.S: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
$(OD)$(EXEPOSTFIX) -l -m armv7e-m --disassemble-all $< > $@
$(BUILD_DIR):
mkdir $@
#######################################
# clean up
#######################################
clean:
-rm -fR $(BUILD_DIR)
#######################################
# clean up
#######################################
setup:
@echo 'installation only works on linux and on linux subsystem for windows 10'
@sudo apt-get update
@sudo apt-get install clang clang-tools gcc-multilib g++-multilib build-essential gcc-arm-none-eabi binutils-arm-none-eabi -y
#######################################
# dependencies
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)
include ../sca.mk
# *** EOF ***
Whitespace-only changes.
@@ -0,0 +1,213 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : mbox_hsem.c
* Description : This file provides code for the configuration
* of the mailbox based on hardware semaphore.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "openamp/open_amp.h"
#include "stm32h7xx_hal.h"
#include "openamp_conf.h"
#include "mbox_hsem.h"
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
#define RX_NO_MSG 0
#define RX_NEW_MSG 1
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
static uint32_t msg_received = RX_NO_MSG;
/* Private functions ---------------------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
void HAL_HSEM_FreeCallback(uint32_t SemMask)
{
/* USER CODE BEGIN HSEM_FREE_CALLBACK */
/* USER CODE END HSEM_FREE_CALLBACK */
/* Prevent unused argument(s) compilation warning */
UNUSED(SemMask);
msg_received = RX_NEW_MSG;
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_HSEM_FREE_CALLBACK_CM7 */
/* USER CODE END PRE_HSEM_FREE_CALLBACK_CM7 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
/* USER CODE BEGIN POST_HSEM_FREE_CALLBACK_CM7 */
/* USER CODE END POST_HSEM_FREE_CALLBACK_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_HSEM_FREE_CALLBACK_CM4 */
/* USER CODE END PRE_HSEM_FREE_CALLBACK_CM4 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE BEGIN POST_HSEM_FREE_CALLBACK_CM4 */
/* USER CODE END POST_HSEM_FREE_CALLBACK_CM4 */
#endif
}
/**
* @brief Initialize MAILBOX with HSEM peripheral
* @param None
* @retval : Operation result
*/
int MAILBOX_Init(void)
{
/* USER CODE BEGIN MAILBOX_INIT */
/* USER CODE END MAILBOX_INIT */
__HAL_RCC_HSEM_CLK_ENABLE();
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_MAILBOX_INIT_CM7 */
/* USER CODE END PRE_MAILBOX_INIT_CM7 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
/* USER CODE BEGIN POST_MAILBOX_INIT_CM7 */
/* USER CODE END POST_MAILBOX_INIT_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN MAILBOX_INIT_CM4 */
/* USER CODE END MAILBOX_INIT_CM4 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE BEGIN POST_MAILBOX_INIT_CM4 */
/* USER CODE END POST_MAILBOX_INIT_CM4 */
#endif
return 0;
}
/**
* @brief Initialize MAILBOX with HSEM peripheral
* @param virtio device
* @retval : Operation result
*/
int MAILBOX_Poll(struct virtio_device *vdev)
{
/* If we got an interrupt, ask for the corresponding virtqueue processing */
if (msg_received == RX_NEW_MSG)
{
/* USER CODE BEGIN NEW_MSG */
/* USER CODE END NEW_MSG */
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_NEW_MSG_CM7 */
/* USER CODE END PRE_NEW_MSG_CM7 */
rproc_virtio_notified(vdev, VRING0_ID);
/* USER CODE BEGIN POST_NEW_MSG_CM7 */
/* USER CODE END POST_NEW_MSG_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_NEW_MSG_CM4 */
/* USER CODE END PRE_NEW_MSG_CM4 */
rproc_virtio_notified(vdev, VRING1_ID);
/* USER CODE BEGIN POST_NEW_MSG_CM4 */
/* USER CODE END POST_NEW_MSG_CM4 */
#endif
msg_received = RX_NO_MSG;
return 0;
}
/* USER CODE BEGIN NO_MSG */
/* USER CODE END NO_MSG */
return -EAGAIN;
}
/**
* @brief Callback function called by OpenAMP MW to notify message processing
* @param VRING id
* @retval Operation result
*/
int MAILBOX_Notify(void *priv, uint32_t id)
{
(void)priv;
(void)id;
/* USER CODE BEGIN MAILBOX_NOTIFY*/
/* USER CODE END MAILBOX_NOTIFY */
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_MAILBOX_NOTIFY_CM7 */
/* USER CODE END PRE_MAILBOX_NOTIFY_CM7 */
HAL_HSEM_FastTake(HSEM_ID_0);
HAL_HSEM_Release(HSEM_ID_0,0);
/* USER CODE BEGIN POST_MAILBOX_NOTIFY_CM7 */
/* USER CODE END POST_MAILBOX_NOTIFY_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_MAILBOX_NOTIFY_CM4 */
/* USER CODE END PRE_MAILBOX_NOTIFY_CM4 */
HAL_HSEM_FastTake(HSEM_ID_1);
HAL_HSEM_Release(HSEM_ID_1,0);
/* USER CODE BEGIN POST_MAILBOX_NOTIFY_CM4 */
/* USER CODE END POST_MAILBOX_NOTIFY_CM4 */
#endif
return 0;
}
@@ -0,0 +1,62 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file mabox_hsem.h
* @author MCD Application Team
* @brief header for mbox_hsem.c module
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef MBOX_HSEM_H_
#define MBOX_HSEM_H_
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#define HSEM_ID_0 0 /* CM7 to CM4 Notification */
#define HSEM_ID_1 1 /* CM4 to CM7 Notification */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
int MAILBOX_Notify(void *priv, uint32_t id);
int MAILBOX_Init(void);
int MAILBOX_Poll(struct virtio_device *vdev);
#endif /* MBOX_HSEM_H_ */
@@ -0,0 +1,285 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp.c
* @author MCD Application Team
* @brief Code for openamp applications
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
#include "openamp.h"
#include "rsc_table.h"
#include "metal/sys.h"
#include "metal/device.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
/* USER CODE END Includes */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
#define SHM_DEVICE_NAME "STM32_SHM"
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
static struct metal_io_region *shm_io;
static struct metal_io_region *rsc_io;
static struct shared_resource_table *rsc_table;
static struct rpmsg_virtio_shm_pool shpool;
static struct rpmsg_virtio_device rvdev;
static metal_phys_addr_t shm_physmap;
struct metal_device shm_device = {
.name = SHM_DEVICE_NAME,
.num_regions = 2,
.regions = {
{.virt = NULL}, /* shared memory */
{.virt = NULL}, /* rsc_table memory */
},
.node = { NULL },
.irq_num = 0,
.irq_info = NULL
};
/* Private functions ---------------------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
static int OPENAMP_shmem_init(int RPMsgRole)
{
int status = 0;
struct metal_device *device = NULL;
struct metal_init_params metal_params = METAL_INIT_DEFAULTS;
void* rsc_tab_addr = NULL;
int rsc_size = 0;
/* USER CODE BEGIN PRE_LIB_METAL_INIT */
/* USER CODE END PRE_LIB_METAL_INIT */
metal_init(&metal_params);
status = metal_register_generic_device(&shm_device);
if (status != 0) {
return status;
}
status = metal_device_open("generic", SHM_DEVICE_NAME, &device);
if (status != 0) {
return status;
}
shm_physmap = SHM_START_ADDRESS;
metal_io_init(&device->regions[0], (void *)SHM_START_ADDRESS, &shm_physmap,
SHM_SIZE, -1, 0, NULL);
/* USER CODE BEGIN PRE_SHM_IO_INIT */
/* USER CODE END PRE_SHM_IO_INIT */
shm_io = metal_device_io_region(device, 0);
if (shm_io == NULL) {
return -1;
}
/* USER CODE BEGIN POST_SHM_IO_INIT */
/* USER CODE END POST_SHM_IO_INIT */
/* Initialize resources table variables */
resource_table_init(RPMsgRole, &rsc_tab_addr, &rsc_size);
rsc_table = (struct shared_resource_table *)rsc_tab_addr;
if (!rsc_table)
{
return -1;
}
/* USER CODE BEGIN POST_RSC_TABLE_INIT */
/* USER CODE END POST_RSC_TABLE_INIT */
metal_io_init(&device->regions[1], rsc_table,
(metal_phys_addr_t *)rsc_table, rsc_size, -1U, 0, NULL);
/* USER CODE BEGIN POST_METAL_IO_INIT */
/* USER CODE END POST_METAL_IO_INIT */
rsc_io = metal_device_io_region(device, 1);
if (rsc_io == NULL) {
return -1;
}
/* USER CODE BEGIN POST_RSC_IO_INIT */
/* USER CODE END POST_RSC_IO_INIT */
return 0;
}
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb)
{
struct fw_rsc_vdev_vring *vring_rsc = NULL;
struct virtio_device *vdev = NULL;
int status = 0;
/* USER CODE BEGIN MAILBOX_Init */
/* USER CODE END MAIL_BOX_Init */
MAILBOX_Init();
/* Libmetal Initilalization */
status = OPENAMP_shmem_init(RPMsgRole);
if(status)
{
return status;
}
/* USER CODE BEGIN PRE_VIRTIO_INIT */
/* USER CODE END PRE_VIRTIO_INIT */
vdev = rproc_virtio_create_vdev(RPMsgRole, VDEV_ID, &rsc_table->vdev,
rsc_io, NULL, MAILBOX_Notify, NULL);
if (vdev == NULL)
{
return -1;
}
rproc_virtio_wait_remote_ready(vdev);
/* USER CODE BEGIN POST_VIRTIO_INIT */
/* USER CODE END POST_VIRTIO_INIT */
vring_rsc = &rsc_table->vring0;
status = rproc_virtio_init_vring(vdev, 0, vring_rsc->notifyid,
(void *)vring_rsc->da, shm_io,
vring_rsc->num, vring_rsc->align);
if (status != 0)
{
return status;
}
/* USER CODE BEGIN POST_VRING0_INIT */
/* USER CODE END POST_VRING0_INIT */
vring_rsc = &rsc_table->vring1;
status = rproc_virtio_init_vring(vdev, 1, vring_rsc->notifyid,
(void *)vring_rsc->da, shm_io,
vring_rsc->num, vring_rsc->align);
if (status != 0)
{
return status;
}
/* USER CODE BEGIN POST_VRING1_INIT */
/* USER CODE END POST_VRING1_INIT */
rpmsg_virtio_init_shm_pool(&shpool, (void *)VRING_BUFF_ADDRESS,
(size_t)SHM_SIZE);
rpmsg_init_vdev(&rvdev, vdev, ns_bind_cb, shm_io, &shpool);
/* USER CODE BEGIN POST_RPMSG_INIT */
/* USER CODE END POST_RPMSG_INIT */
return 0;
}
void OPENAMP_DeInit()
{
/* USER CODE BEGIN PRE_OPENAMP_DEINIT */
/* USER CODE END PRE_OPENAMP_DEINIT */
rpmsg_deinit_vdev(&rvdev);
metal_finish();
/* USER CODE BEGIN POST_OPENAMP_DEINIT */
/* USER CODE END POST_OPENAMP_DEINIT */
}
void OPENAMP_init_ept(struct rpmsg_endpoint *ept)
{
/* USER CODE BEGIN PRE_EP_INIT */
/* USER CODE END PRE_EP_INIT */
rpmsg_init_ept(ept, "", RPMSG_ADDR_ANY, RPMSG_ADDR_ANY, NULL, NULL);
/* USER CODE BEGIN POST_EP_INIT */
/* USER CODE END POST_EP_INIT */
}
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
uint32_t dest, rpmsg_ept_cb cb,
rpmsg_ns_unbind_cb unbind_cb)
{
int ret = 0;
/* USER CODE BEGIN PRE_EP_CREATE */
/* USER CODE END PRE_EP_CREATE */
ret = rpmsg_create_ept(ept, &rvdev.rdev, name, RPMSG_ADDR_ANY, dest, cb,
unbind_cb);
/* USER CODE BEGIN POST_EP_CREATE */
/* USER CODE END POST_EP_CREATE */
return ret;
}
void OPENAMP_check_for_message(void)
{
/* USER CODE BEGIN MSG_CHECK */
/* USER CODE END MSG_CHECK */
MAILBOX_Poll(rvdev.vdev);
}
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept)
{
/* USER CODE BEGIN EP_READY */
/* USER CODE END EP_READY */
while(!is_rpmsg_ept_ready(rp_ept))
{
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
MAILBOX_Poll(rvdev.vdev);
/* USER CODE BEGIN 1 */
if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING) {
vTaskDelay(pdMS_TO_TICKS(1));
}
/* USER CODE END 1 */
}
}
@@ -0,0 +1,87 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp.h
* @brief Header for openamp applications
* @author MCD Application Team
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __openamp_H
#define __openamp_H
#ifdef __cplusplus
extern "C" {
#endif
#include "openamp/open_amp.h"
#include "openamp_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#define OPENAMP_send rpmsg_send
#define OPENAMP_destroy_ept rpmsg_destroy_ept
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Initialize the openamp framework*/
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb);
/* Deinitialize the openamp framework*/
void OPENAMP_DeInit(void);
/* Initialize the endpoint struct*/
void OPENAMP_init_ept(struct rpmsg_endpoint *ept);
/* Create and register the endpoint */
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
uint32_t dest, rpmsg_ept_cb cb,
rpmsg_ns_unbind_cb unbind_cb);
/* Check for new rpmsg reception */
void OPENAMP_check_for_message(void);
/* Wait loop on endpoint ready ( message dest address is know)*/
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept);
#ifdef __cplusplus
}
#endif
#endif /*__openamp_H */
@@ -0,0 +1,251 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp_conf.h
* @author MCD Application Team
* @brief Configuration file for OpenAMP MW
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
*
******************************************************************************
*/
#if defined(METAL_MAX_DEVICE_REGIONS)
# undef METAL_MAX_DEVICE_REGIONS
# define METAL_MAX_DEVICE_REGIONS 32
#endif
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __OPENAMP_CONF__H__
#define __OPENAMP_CONF__H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#if defined (__LOG_TRACE_IO_) || defined(__LOG_UART_IO_)
#include "openamp_log.h"
#endif
/* ########################## Mailbox Interface Selection ############################## */
/**
* @brief This is the list of Mailbox interface to be used in the OpenAMP MW
* Please note that not all interfaces are supported by a STM32 device
*/
//#define MAILBOX_IPCC_IF_ENABLED
#define MAILBOX_HSEM_IF_ENABLED
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include Mailbox interface header file
*/
#ifdef MAILBOX_IPCC_IF_ENABLED
#include "mbox_ipcc.h"
#endif /* MAILBOX_IPCC_IF_ENABLED */
#ifdef MAILBOX_HSEM_IF_ENABLED
#include "mbox_hsem.h"
#endif /* MAILBOX_HSEM_IF_ENABLED */
/* ########################## Virtual Diver Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the OpenAMP Virtual driver module
* Please note that virtual driver are not supported on all stm32 families
*/
//#define VIRTUAL_UART_MODULE_ENABLED
//#define VIRTUAL_I2C_MODULE_ENABLED
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include Virtual Driver module's header file
*/
#ifdef VIRTUAL_UART_MODULE_ENABLED
#include "virt_uart.h"
#endif /* VIRTUAL_UART_MODULE_ENABLED */
#ifdef VIRTUAL_I2C_MODULE_ENABLED
#include "virt_i2c.h"
#endif /* VIRTUAL_I2C_MODULE_ENABLED */
/* ########################## Linux Master Selection ############################## */
/**
* @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
* In that case, the LINUX_RPROC_MASTER define is required
*/
//#define LINUX_RPROC_MASTER
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup OPENAMP_MW
* @{
*/
/** @defgroup OPENAMP_CONF OPENAMP_CONF
* @brief Configuration file for Openamp mw
* @{
*/
/** @defgroup OPENAMP_CONF_Exported_Variables OPENAMP_CONF_Exported_Variables
* @brief Public variables.
* @{
*/
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Defines OPENAMP_CONF_Exported_Defines
* @brief Defines for configuration of the Openamp mw
* @{
*/
#if defined (__ICCARM__)
/*
* For IAR, the .icf file should contain the following lines:
* define symbol __OPENAMP_region_start__ = BASE_ADDRESS; (0x38000400 for example)
* define symbol __OPENAMP_region_size__ = MEM_SIZE; (0xB000 as example)
*
* export symbol __OPENAMP_region_start__;
* export symbol __OPENAMP_region_size__;
*/
extern const uint32_t __OPENAMP_region_start__;
extern const uint8_t __OPENAMP_region_size__;
#define SHM_START_ADDRESS ((metal_phys_addr_t)&__OPENAMP_region_start__)
#define SHM_SIZE ((size_t)&__OPENAMP_region_size__)
#elif defined(__CC_ARM) || defined (__clang__)
/*
* For MDK-ARM, the scatter file .sct should contain the following line:
* LR_IROM1 .... {
* ...
* __OpenAMP_SHMEM__ 0x38000400 EMPTY 0x0000B000 {} ; Shared Memory area used by OpenAMP
* }
*
*/
extern unsigned int Image$$__OpenAMP_SHMEM__$$Base;
extern unsigned int Image$$__OpenAMP_SHMEM__$$ZI$$Length;
#define SHM_START_ADDRESS (unsigned int)&Image$$__OpenAMP_SHMEM__$$Base
#define SHM_SIZE ((size_t)&Image$$__OpenAMP_SHMEM__$$ZI$$Length)
#else
/*
* for GCC add the following content to the .ld file:
* MEMORY
* {
* ...
* OPEN_AMP_SHMEM (xrw) : ORIGIN = 0x38000400, LENGTH = 63K
* }
* __OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
* __OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
*
* using the LENGTH(OPEN_AMP_SHMEM) to set the SHM_SIZE lead to a crash thus we
* use the start and end address.
*/
extern int __OPENAMP_region_start__[]; /* defined by linker script */
extern int __OPENAMP_region_end__[]; /* defined by linker script */
#define SHM_START_ADDRESS ((metal_phys_addr_t)__OPENAMP_region_start__)
#define SHM_SIZE (size_t)((void *)__OPENAMP_region_end__ - (void *) __OPENAMP_region_start__)
#endif
#if defined LINUX_RPROC_MASTER
#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_ALIGNMENT 16 /* fixed to match with linux constraint */
#define VRING_NUM_BUFFS 16 /* number of rpmsg buffer */
#else
#define VRING_RX_ADDRESS SHM_START_ADDRESS
#define VRING_TX_ADDRESS (SHM_START_ADDRESS + 0x400)
#define VRING_BUFF_ADDRESS (SHM_START_ADDRESS + 0x800)
#define VRING_ALIGNMENT 4
#define VRING_NUM_BUFFS 4 /* number of rpmsg buffers */
#endif
/* Fixed parameter */
#define NUM_RESOURCE_ENTRIES 2
#define VRING_COUNT 2
#define VDEV_ID 0xFF
#define VRING0_ID 0 /* VRING0 ID (master to remote) fixed to 0 for linux compatibility*/
#define VRING1_ID 1 /* VRING1 ID (remote to master) fixed to 1 for linux compatibility */
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Macros OPENAMP_CONF_Exported_Macros
* @brief Aliases.
* @{
*/
/* DEBUG macros */
#if defined (__LOG_TRACE_IO_) || defined(__LOG_UART_IO_)
#define OPENAMP_log_dbg log_dbg
#define OPENAMP_log_info log_info
#define OPENAMP_log_warn log_warn
#define OPENAMP_log_err log_err
#else
#define OPENAMP_log_dbg(...)
#define OPENAMP_log_info(...)
#define OPENAMP_log_warn(...)
#define OPENAMP_log_err(...)
#endif
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Types OPENAMP_CONF_Exported_Types
* @brief Types.
* @{
*/
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_FunctionsPrototype OPENAMP_CONF_Exported_FunctionsPrototype
* @brief Declaration of public functions for OpenAMP mw.
* @{
*/
/* Exported functions -------------------------------------------------------*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __OPENAMP_CONF__H__ */
@@ -0,0 +1,175 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file rsc_table.c
* @author MCD Application Team
* @brief Resource table
*
* This file provides a default resource table requested by remote proc to
* load the elf file. It also allows to add debug trace using a shared buffer.
*
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/** @addtogroup RSC_TABLE
* @{
*/
/** @addtogroup resource_table
* @{
*/
/** @addtogroup resource_table_Private_Includes
* @{
*/
#if defined(__ICCARM__) || defined (__CC_ARM)
#include <stddef.h> /* needed for offsetof definition*/
#endif
#include "rsc_table.h"
#include "openamp/open_amp.h"
/**
* @}
*/
/** @addtogroup resource_table_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @addtogroup resource_table_Private_Defines
* @{
*/
/* Place resource table in special ELF section */
#if defined(__GNUC__)
#define __section_t(S) __attribute__((__section__(#S)))
#define __resource __section_t(.resource_table)
#endif
#if defined (LINUX_RPROC_MASTER)
#ifdef VIRTIO_MASTER_ONLY
#define CONST
#else
#define CONST const
#endif
#else
#define CONST
#endif
#define RPMSG_IPU_C0_FEATURES 1
#define VRING_COUNT 2
/* VirtIO rpmsg device id */
#define VIRTIO_ID_RPMSG_ 7
#if defined (__LOG_TRACE_IO_)
extern char system_log_buf[];
#endif
#if defined(__GNUC__)
#if !defined (__CC_ARM) && !defined (LINUX_RPROC_MASTER)
/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
* for the CM4 (see resource_table_init() below)
*/
volatile struct shared_resource_table __resource __attribute__((used)) resource_table;
#else
CONST struct shared_resource_table __resource __attribute__((used)) resource_table = {
#endif
#elif defined(__ICCARM__)
__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
#endif
#if defined(__ICCARM__) || defined (__CC_ARM) || defined (LINUX_RPROC_MASTER)
.version = 1,
#if defined (__LOG_TRACE_IO_)
.num = 2,
#else
.num = 1,
#endif
.reserved = {0, 0},
.offset = {
offsetof(struct shared_resource_table, vdev),
offsetof(struct shared_resource_table, cm_trace),
},
/* Virtio device entry */
.vdev= {
RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0,
VRING_COUNT, {0, 0},
},
/* Vring rsc entry - part of vdev rsc entry */
.vring0 = {VRING_TX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING0_ID, 0},
.vring1 = {VRING_RX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING1_ID, 0},
#if defined (__LOG_TRACE_IO_)
.cm_trace = {
RSC_TRACE,
(uint32_t)system_log_buf, SYSTEM_TRACE_BUF_SZ, 0, "cm4_log",
},
#endif
} ;
#endif
void resource_table_init(int RPMsgRole, void **table_ptr, int *length)
{
#if !defined (LINUX_RPROC_MASTER)
#if defined (__GNUC__) && ! defined (__CC_ARM)
#ifdef VIRTIO_MASTER_ONLY
/*
* Currently the GCC linker doesn't initialize the resource_table global variable at startup
* it is done here by the master application.
*/
memset(&resource_table, '\0', sizeof(struct shared_resource_table));
resource_table.num = 1;
resource_table.version = 1;
resource_table.offset[0] = offsetof(struct shared_resource_table, vdev);
resource_table.vring0.da = VRING_TX_ADDRESS;
resource_table.vring0.align = VRING_ALIGNMENT;
resource_table.vring0.num = VRING_NUM_BUFFS;
resource_table.vring0.notifyid = VRING0_ID;
resource_table.vring1.da = VRING_RX_ADDRESS;
resource_table.vring1.align = VRING_ALIGNMENT;
resource_table.vring1.num = VRING_NUM_BUFFS;
resource_table.vring1.notifyid = VRING1_ID;
resource_table.vdev.type = RSC_VDEV;
resource_table.vdev.id = VIRTIO_ID_RPMSG_;
resource_table.vdev.num_of_vrings=VRING_COUNT;
resource_table.vdev.dfeatures = RPMSG_IPU_C0_FEATURES;
#else
/* For the slave application let's wait until the resource_table is correctly initialized */
while(resource_table.vring1.da != VRING_RX_ADDRESS)
{
}
#endif
#endif
#endif
(void)RPMsgRole;
*length = sizeof(resource_table);
*table_ptr = (void *)&resource_table;
}
@@ -0,0 +1,74 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* This file populates resource table for BM remote
* for use by the Linux Master */
/* USER CODE END Header */
#ifndef RSC_TABLE_H_
#define RSC_TABLE_H_
#include "openamp/open_amp.h"
#include "openamp_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* Resource table for the given remote */
struct shared_resource_table {
unsigned int version;
unsigned int num;
unsigned int reserved[2];
unsigned int offset[NUM_RESOURCE_ENTRIES];
/* text carveout entry */
/* rpmsg vdev entry */
struct fw_rsc_vdev vdev;
struct fw_rsc_vdev_vring vring0;
struct fw_rsc_vdev_vring vring1;
struct fw_rsc_trace cm_trace;
};
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
void resource_table_init(int RPMsgRole, void **table_ptr, int *length);
#endif /* RSC_TABLE_H_ */
@@ -0,0 +1,200 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 1024Kbytes FLASH
** 800Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** Copyright (c) 2024 STMicroelectronics.
** All rights reserved.
**
** This software is licensed under terms that can be found in the LICENSE file
** in the root directory of this software component.
** If no LICENSE file comes with this software, it is provided AS-IS.
**
*****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of "RAM_D1" Ram type memory */
_Min_Heap_Size = 0x2000; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
/* Memories definition */
MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* Memory is divided. Actual start is 0x08000000 and actual length is 2048K */
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
OPEN_AMP_RSCT (xrw) : ORIGIN = 0x38000000, LENGTH = 1K
OPEN_AMP_SHMEM (xrw) : ORIGIN = 0x38000400, LENGTH = 63K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
__OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
__OPENAMP_region_size__ = LENGTH(OPEN_AMP_SHMEM);
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
/* Sections */
SECTIONS
{
/* The startup code into "FLASH" Rom type memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
/* The program code and other data into "FLASH" Rom type memory */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH
/* Constant data into "FLASH" Rom type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >FLASH
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} >FLASH
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >FLASH
/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections into "RAM" Ram type memory */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM_D1 AT> FLASH
/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM_D1
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM_D1
.openamp_section (NOLOAD) :
{
. = ABSOLUTE(0x38000000);
*(.resource_table)
} > OPEN_AMP_RSCT AT >FLASH
/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}
@@ -0,0 +1,190 @@
/*
******************************************************************************
**
** File : LinkerScript.ld (debug in RAM dedicated)
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 1024Kbytes FLASH
** 800Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** Copyright (c) 2024 STMicroelectronics.
** All rights reserved.
**
** This software is licensed under terms that can be found in the LICENSE file
** in the root directory of this software component.
** If no LICENSE file comes with this software, it is provided AS-IS.
**
*****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of "RAM_D1" Ram type memory */
_Min_Heap_Size = 0x2000; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
/* Memories definition */
MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* Memory is divided. Actual start is 0x8000000 and actual length is 2048K */
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
/* Sections */
SECTIONS
{
/* The startup code into "RAM" Ram type memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >RAM_D1
/* The program code and other data into "RAM" Ram type memory */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >RAM_D1
/* Constant data into "RAM" Ram type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >RAM_D1
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >RAM_D1
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} >RAM_D1
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >RAM_D1
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >RAM_D1
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >RAM_D1
/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections into "RAM" Ram type memory */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM_D1
/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM_D1
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM_D1
/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth__pwd_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_certif_path" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_check_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_key_path" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_pwd_file" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="true"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.incremental_flashing" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.ip_address_local" value="localhost"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.value" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.loadList" value="{&quot;fItems&quot;:[{&quot;fIsFromMainTab&quot;:false,&quot;fPath&quot;:&quot;Debug/stepper_h7_CM4.elf&quot;,&quot;fProjectName&quot;:&quot;stepper_h7_CM4&quot;,&quot;fUseActiveBuildConfig&quot;:true,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:true,&quot;fLoadSymbols&quot;:true},{&quot;fIsFromMainTab&quot;:true,&quot;fPath&quot;:&quot;Debug/stepper_h7_CM7.elf&quot;,&quot;fProjectName&quot;:&quot;stepper_h7_CM7&quot;,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:true,&quot;fLoadSymbols&quot;:true}]}"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.mode" value="2"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.multi_drop_enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.override_start_address_mode" value="default"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.port" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.remoteCommand" value="target remote"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.semihosting" value="Enable terminal and File I/O mode"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startServer" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.divby0" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.unaligned" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.haltonexception" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swd_mode" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="61235"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="400000000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_max_halt_delay" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\HomeGit\dhbw\EmbSys\RealtimeProg\MCU_STM32_60h\stepper_h7\CM7\Debug\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="disable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="disable"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="freertos"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverAuto" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverPort" value="ARM_CM7"/>
<intAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyPort" value="60001"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.st.stm32cube.ide.mcu.debug.stlink"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="61234"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/stepper_h7_CM7.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="stepper_h7_CM7"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/stepper_h7_CM7"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&lt;gdbmemoryBlockExpression address=&quot;939528720&quot; label=&quot;0x38001210&quot;/&gt;&lt;gdbmemoryBlockExpression address=&quot;939527184&quot; label=&quot;0x38000c10&quot;/&gt;&lt;/memoryBlockExpressionList&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration>
@@ -0,0 +1,420 @@
/**
******************************************************************************
* @file system_stm32h7xx_dualcore_boot_cm4_cm7.c
* @author MCD Application Team
* @brief CMSIS Cortex-Mx Device Peripheral Access Layer System Source File.
* This provides system initialization template function is case of
* an application using a dual core STM32H7 device where
* Cortex-M7 and Cortex-M4 boot are enabled at the FLASH option bytes
*
* This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the "startup_stm32h7xx.s" file.
*
* - SystemCoreClock variable: Contains the core clock, it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
*
*
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32h7xx_system
* @{
*/
/** @addtogroup STM32H7xx_System_Private_Includes
* @{
*/
#include "stm32h7xx.h"
#include <math.h>
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */
#if !defined (CSI_VALUE)
#define CSI_VALUE ((uint32_t)4000000) /*!< Value of the Internal oscillator in Hz*/
#endif /* CSI_VALUE */
#if !defined (HSI_VALUE)
#define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Private_Defines
* @{
*/
/************************* Miscellaneous Configuration ************************/
/* Note: Following vector table addresses must be defined in line with linker
configuration. */
/*!< Uncomment the following line if you need to relocate the vector table
anywhere in FLASH BANK1 or AXI SRAM, else the vector table is kept at the automatic
remap of boot address selected */
/* #define USER_VECT_TAB_ADDRESS */
#if defined(USER_VECT_TAB_ADDRESS)
#if defined(CORE_CM4)
/*!< Uncomment the following line if you need to relocate your vector Table
in D2 AXI SRAM else user remap will be done in FLASH BANK2. */
/* #define VECT_TAB_SRAM */
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS D2_AXISRAM_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x400. */
#else
#define VECT_TAB_BASE_ADDRESS FLASH_BANK2_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x400. */
#endif /* VECT_TAB_SRAM */
#elif defined(CORE_CM7)
/*!< Uncomment the following line if you need to relocate your vector Table
in D1 AXI SRAM else user remap will be done in FLASH BANK1. */
/* #define VECT_TAB_SRAM */
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS D1_AXISRAM_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x400. */
#else
#define VECT_TAB_BASE_ADDRESS FLASH_BANK1_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x400. */
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x400. */
#endif /* VECT_TAB_SRAM */
#else
#error Please #define CORE_CM4 or CORE_CM7
#endif /* CORE_CM4 */
#endif /* USER_VECT_TAB_ADDRESS */
/******************************************************************************/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Private_Macros
* @{
*/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Private_Variables
* @{
*/
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetHCLKFreq()
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
Note: If you use this function to configure the system clock; then there
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
*/
uint32_t SystemCoreClock = 64000000;
uint32_t SystemD2Clock = 64000000;
const uint8_t D1CorePrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Private_FunctionPrototypes
* @{
*/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Private_Functions
* @{
*/
/**
* @brief Setup the microcontroller system
* Initialize the FPU setting and vector table location
* configuration.
* @param None
* @retval None
*/
void SystemInit (void)
{
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */
#endif
/*SEVONPEND enabled so that an interrupt coming from the CPU(n) interrupt signal is
detectable by the CPU after a WFI/WFE instruction.*/
SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
#if defined(CORE_CM7)
/* Reset the RCC clock configuration to the default reset state ------------*/
/* Increasing the CPU frequency */
if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY)))
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT));
}
/* Set HSION bit */
RCC->CR |= RCC_CR_HSION;
/* Reset CFGR register */
RCC->CFGR = 0x00000000;
/* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */
RCC->CR &= 0xEAF6ED7FU;
/* Decreasing the number of wait states because of lower CPU frequency */
if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY)))
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT));
}
/* Reset D1CFGR register */
RCC->D1CFGR = 0x00000000;
/* Reset D2CFGR register */
RCC->D2CFGR = 0x00000000;
/* Reset D3CFGR register */
RCC->D3CFGR = 0x00000000;
/* Reset PLLCKSELR register */
RCC->PLLCKSELR = 0x02020200;
/* Reset PLLCFGR register */
RCC->PLLCFGR = 0x01FF0000;
/* Reset PLL1DIVR register */
RCC->PLL1DIVR = 0x01010280;
/* Reset PLL1FRACR register */
RCC->PLL1FRACR = 0x00000000;
/* Reset PLL2DIVR register */
RCC->PLL2DIVR = 0x01010280;
/* Reset PLL2FRACR register */
RCC->PLL2FRACR = 0x00000000;
/* Reset PLL3DIVR register */
RCC->PLL3DIVR = 0x01010280;
/* Reset PLL3FRACR register */
RCC->PLL3FRACR = 0x00000000;
/* Reset HSEBYP bit */
RCC->CR &= 0xFFFBFFFFU;
/* Disable all interrupts */
RCC->CIER = 0x00000000;
/* Enable CortexM7 HSEM EXTI line (line 78)*/
EXTI_D2->EMR3 |= 0x4000UL;
if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U)
{
/* if stm32h7 revY*/
/* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */
*((__IO uint32_t*)0x51008108) = 0x000000001U;
}
#endif /* CORE_CM7*/
#if defined(CORE_CM4)
/* Configure the Vector Table location add offset address for cortex-M4 ------------------*/
#if defined(USER_VECT_TAB_ADDRESS)
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal D2 AXI-RAM or in Internal FLASH */
#endif /* USER_VECT_TAB_ADDRESS */
#elif defined(CORE_CM7)
/*
* Disable the FMC bank1 (enabled after reset).
* This, prevents CPU speculation access on this bank which blocks the use of FMC during
* 24us. During this time the others FMC master (such as LTDC) cannot use it!
*/
FMC_Bank1_R->BTCR[0] = 0x000030D2;
/* Configure the Vector Table location -------------------------------------*/
#if defined(USER_VECT_TAB_ADDRESS)
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal D1 AXI-RAM or in Internal FLASH */
#endif /* USER_VECT_TAB_ADDRESS */
#else
#error Please #define CORE_CM4 or CORE_CM7
#endif /* CORE_CM4 */
}
/**
* @brief Update SystemCoreClock variable according to Clock Register Values.
* The SystemCoreClock variable contains the core clock , it can
* be used by the user application to setup the SysTick timer or configure
* other parameters.
*
* @note Each time the core clock changes, this function must be called
* to update SystemCoreClock variable value. Otherwise, any configuration
* based on this variable will be incorrect.
*
* @note - The system frequency computed by this function is not the real
* frequency in the chip. It is calculated based on the predefined
* constant and the selected clock source:
*
* - If SYSCLK source is CSI, SystemCoreClock will contain the CSI_VALUE(*)
* - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**)
* - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***)
* - If SYSCLK source is PLL, SystemCoreClock will contain the CSI_VALUE(*),
* HSI_VALUE(**) or HSE_VALUE(***) multiplied/divided by the PLL factors.
*
* (*) CSI_VALUE is a constant defined in stm32h7xx_hal.h file (default value
* 4 MHz) but the real value may vary depending on the variations
* in voltage and temperature.
* (**) HSI_VALUE is a constant defined in stm32h7xx_hal.h file (default value
* 64 MHz) but the real value may vary depending on the variations
* in voltage and temperature.
*
* (***)HSE_VALUE is a constant defined in stm32h7xx_hal.h file (default value
* 25 MHz), user has to ensure that HSE_VALUE is same as the real
* frequency of the crystal used. Otherwise, this function may
* have wrong result.
*
* - The result of this function could be not correct when using fractional
* value for HSE crystal.
* @param None
* @retval None
*/
void SystemCoreClockUpdate (void)
{
uint32_t pllp, pllsource, pllm, pllfracen, hsivalue, tmp;
uint32_t common_system_clock;
float_t fracn1, pllvco;
/* Get SYSCLK source -------------------------------------------------------*/
switch (RCC->CFGR & RCC_CFGR_SWS)
{
case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
common_system_clock = (uint32_t) (HSI_VALUE >> ((RCC->CR & RCC_CR_HSIDIV)>> 3));
break;
case RCC_CFGR_SWS_CSI: /* CSI used as system clock source */
common_system_clock = CSI_VALUE;
break;
case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
common_system_clock = HSE_VALUE;
break;
case RCC_CFGR_SWS_PLL1: /* PLL1 used as system clock source */
/* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLLM) * PLLN
SYSCLK = PLL_VCO / PLLR
*/
pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC);
pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1)>> 4) ;
pllfracen = ((RCC->PLLCFGR & RCC_PLLCFGR_PLL1FRACEN)>>RCC_PLLCFGR_PLL1FRACEN_Pos);
fracn1 = (float_t)(uint32_t)(pllfracen* ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1)>> 3));
if (pllm != 0U)
{
switch (pllsource)
{
case RCC_PLLCKSELR_PLLSRC_HSI: /* HSI used as PLL clock source */
hsivalue = (HSI_VALUE >> ((RCC->CR & RCC_CR_HSIDIV)>> 3)) ;
pllvco = ( (float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
break;
case RCC_PLLCKSELR_PLLSRC_CSI: /* CSI used as PLL clock source */
pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
break;
case RCC_PLLCKSELR_PLLSRC_HSE: /* HSE used as PLL clock source */
pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
break;
default:
hsivalue = (HSI_VALUE >> ((RCC->CR & RCC_CR_HSIDIV)>> 3)) ;
pllvco = ((float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
break;
}
pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >>9) + 1U ) ;
common_system_clock = (uint32_t)(float_t)(pllvco/(float_t)pllp);
}
else
{
common_system_clock = 0U;
}
break;
default:
common_system_clock = (uint32_t) (HSI_VALUE >> ((RCC->CR & RCC_CR_HSIDIV)>> 3));
break;
}
/* Compute SystemClock frequency --------------------------------------------------*/
tmp = D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos];
/* common_system_clock frequency : CM7 CPU frequency */
common_system_clock >>= tmp;
/* SystemD2Clock frequency : CM4 CPU, AXI and AHBs Clock frequency */
SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU));
#if defined(CORE_CM4)
SystemCoreClock = SystemD2Clock;
#else
SystemCoreClock = common_system_clock;
#endif /* CORE_CM4 */
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
@@ -0,0 +1,302 @@
/**
******************************************************************************
* @file stm32h7xx.h
* @author MCD Application Team
* @brief CMSIS STM32H7xx Device Peripheral Access Layer Header File.
*
* The file is the unique include file that the application programmer
* is using in the C source code, usually in main.c. This file contains:
* - Configuration section that allows to select:
* - The STM32H7xx device used in the target application
* - To use or not the peripheral's drivers in application code(i.e.
* code will be based on direct access to peripheral's registers
* rather than drivers API), this option is controlled by
* "#define USE_HAL_DRIVER"
*
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32h7xx
* @{
*/
#ifndef STM32H7xx_H
#define STM32H7xx_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** @addtogroup Library_configuration_section
* @{
*/
/**
* @brief STM32 Family
*/
#if !defined (STM32H7)
#define STM32H7
#endif /* STM32H7 */
/* Uncomment the line below according to the target STM32H7 device used in your
application
*/
#if !defined (STM32H743xx) && !defined (STM32H753xx) && !defined (STM32H750xx) && !defined (STM32H742xx) && \
!defined (STM32H745xx) && !defined (STM32H745xG) && !defined (STM32H755xx) && !defined (STM32H747xx) && !defined (STM32H747xG)&& !defined (STM32H757xx) && \
!defined (STM32H7A3xx) && !defined (STM32H7A3xxQ) && !defined (STM32H7B3xx) && !defined (STM32H7B3xxQ) && !defined (STM32H7B0xx) && !defined (STM32H7B0xxQ) && \
!defined (STM32H735xx) && !defined (STM32H733xx) && !defined (STM32H730xx) && !defined (STM32H730xxQ) && !defined (STM32H725xx) && !defined (STM32H723xx)
/* #define STM32H742xx */ /*!< STM32H742VI, STM32H742ZI, STM32H742AI, STM32H742II, STM32H742BI, STM32H742XI Devices */
/* #define STM32H743xx */ /*!< STM32H743VI, STM32H743ZI, STM32H743AI, STM32H743II, STM32H743BI, STM32H743XI Devices */
/* #define STM32H753xx */ /*!< STM32H753VI, STM32H753ZI, STM32H753AI, STM32H753II, STM32H753BI, STM32H753XI Devices */
/* #define STM32H750xx */ /*!< STM32H750V, STM32H750I, STM32H750X Devices */
/* #define STM32H747xx */ /*!< STM32H747ZI, STM32H747AI, STM32H747II, STM32H747BI, STM32H747XI Devices */
/* #define STM32H747xG */ /*!< STM32H747AG, STM32H747IG, STM32H747BG, STM32H747XG */
/* #define STM32H757xx */ /*!< STM32H757ZI, STM32H757AI, STM32H757II, STM32H757BI, STM32H757XI Devices */
/* #define STM32H745xx */ /*!< STM32H745ZI, STM32H745II, STM32H745BI, STM32H745XI Devices */
/* #define STM32H745xG */ /*!< STM32H745ZG, STM32H745IG, STM32H745BG, STM32H745XG Devices */
/* #define STM32H755xx */ /*!< STM32H755ZI, STM32H755II, STM32H755BI, STM32H755XI Devices */
/* #define STM32H7B0xx */ /*!< STM32H7B0IBTx, STM32H7B0RBTx, STM32H7B0VBTx, STM32H7B0ZBTx Devices */
/* #define STM32H7B0xxQ */ /*!< STM32H7B0ABIxQ, STM32H7B0IBKxQ Devices */
/* #define STM32H7A3xx */ /*!< STM32H7A3IIK6, STM32H7A3IIT6, STM32H7A3NIH6, STM32H7A3RIT6, STM32H7A3VIH6, STM32H7A3VIT6, STM32H7A3ZIT6 */
/* #define STM32H7A3xxQ */ /*!< STM32H7A3QIY6Q, STM32H7A3IIK6Q, STM32H7A3IIT6Q, STM32H7A3LIH6Q, STM32H7A3VIH6Q, STM32H7A3VIT6Q, STM32H7A3AII6Q, STM32H7A3ZIT6Q */
/* #define STM32H7B3xx */ /*!< STM32H7B3IIK6, STM32H7B3IIT6, STM32H7B3NIH6, STM32H7B3RIT6, STM32H7B3VIH6, STM32H7B3VIT6, STM32H7B3ZIT6 */
/* #define STM32H7B3xxQ */ /*!< STM32H7B3QIY6Q, STM32H7B3IIK6Q, STM32H7B3IIT6Q, STM32H7B3LIH6Q, STM32H7B3VIH6Q, STM32H7B3VIT6Q, STM32H7B3AII6Q, STM32H7B3ZIT6Q */
/* #define STM32H735xx */ /*!< STM32H735AGI6, STM32H735IGK6, STM32H735RGV6, STM32H735VGT6, STM32H735VGY6, STM32H735ZGT6 Devices */
/* #define STM32H733xx */ /*!< STM32H733VGH6, STM32H733VGT6, STM32H733ZGI6, STM32H733ZGT6, Devices */
/* #define STM32H730xx */ /*!< STM32H730VBH6, STM32H730VBT6, STM32H730ZBT6, STM32H730ZBI6 Devices */
/* #define STM32H730xxQ */ /*!< STM32H730IBT6Q, STM32H730ABI6Q, STM32H730IBK6Q Devices */
/* #define STM32H725xx */ /*!< STM32H725AGI6, STM32H725IGK6, STM32H725IGT6, STM32H725RGV6, STM32H725VGT6, STM32H725VGY6, STM32H725ZGT6, STM32H725REV6, SM32H725VET6, STM32H725ZET6, STM32H725AEI6, STM32H725IET6, STM32H725IEK6 Devices */
/* #define STM32H723xx */ /*!< STM32H723VGH6, STM32H723VGT6, STM32H723ZGI6, STM32H723ZGT6, STM32H723VET6, STM32H723VEH6, STM32H723ZET6, STM32H723ZEI6 Devices */
#endif
/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
*/
#if !defined (USE_HAL_DRIVER)
/**
* @brief Comment the line below if you will not use the peripherals drivers.
In this case, these drivers will not be included and the application code will
be based on direct access to peripherals registers
*/
/*#define USE_HAL_DRIVER */
#endif /* USE_HAL_DRIVER */
/**
* @brief CMSIS Device version number V1.10.7
*/
#define __STM32H7xx_CMSIS_DEVICE_VERSION_MAIN (0x01) /*!< [31:24] main version */
#define __STM32H7xx_CMSIS_DEVICE_VERSION_SUB1 (0x0A) /*!< [23:16] sub1 version */
#define __STM32H7xx_CMSIS_DEVICE_VERSION_SUB2 (0x07) /*!< [15:8] sub2 version */
#define __STM32H7xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __STM32H7xx_CMSIS_DEVICE_VERSION ((__STM32H7xx_CMSIS_DEVICE_VERSION_MAIN << 24)\
|(__STM32H7xx_CMSIS_DEVICE_VERSION_SUB1 << 16)\
|(__STM32H7xx_CMSIS_DEVICE_VERSION_SUB2 << 8 )\
|(__STM32H7xx_CMSIS_DEVICE_VERSION_RC))
/**
* @}
*/
/** @addtogroup Device_Included
* @{
*/
#if defined(STM32H743xx)
#include "stm32h743xx.h"
#elif defined(STM32H753xx)
#include "stm32h753xx.h"
#elif defined(STM32H750xx)
#include "stm32h750xx.h"
#elif defined(STM32H742xx)
#include "stm32h742xx.h"
#elif defined(STM32H745xx)
#include "stm32h745xx.h"
#elif defined(STM32H745xG)
#include "stm32h745xg.h"
#elif defined(STM32H755xx)
#include "stm32h755xx.h"
#elif defined(STM32H747xx)
#include "stm32h747xx.h"
#elif defined(STM32H747xG)
#include "stm32h747xg.h"
#elif defined(STM32H757xx)
#include "stm32h757xx.h"
#elif defined(STM32H7B0xx)
#include "stm32h7b0xx.h"
#elif defined(STM32H7B0xxQ)
#include "stm32h7b0xxq.h"
#elif defined(STM32H7A3xx)
#include "stm32h7a3xx.h"
#elif defined(STM32H7B3xx)
#include "stm32h7b3xx.h"
#elif defined(STM32H7A3xxQ)
#include "stm32h7a3xxq.h"
#elif defined(STM32H7B3xxQ)
#include "stm32h7b3xxq.h"
#elif defined(STM32H735xx)
#include "stm32h735xx.h"
#elif defined(STM32H733xx)
#include "stm32h733xx.h"
#elif defined(STM32H730xx)
#include "stm32h730xx.h"
#elif defined(STM32H730xxQ)
#include "stm32h730xxq.h"
#elif defined(STM32H725xx)
#include "stm32h725xx.h"
#elif defined(STM32H723xx)
#include "stm32h723xx.h"
#else
#error "Please select first the target STM32H7xx device used in your application (in stm32h7xx.h file)"
#endif
#if defined(DUAL_CORE) && !defined(CORE_CM4) && !defined(CORE_CM7)
#error "Dual core device, please select CORE_CM4 or CORE_CM7"
#endif
/**
* @}
*/
/** @addtogroup Exported_types
* @{
*/
typedef enum
{
RESET = 0,
SET = !RESET
} FlagStatus, ITStatus;
typedef enum
{
DISABLE = 0,
ENABLE = !DISABLE
} FunctionalState;
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
typedef enum
{
SUCCESS = 0,
ERROR = !SUCCESS
} ErrorStatus;
/**
* @}
*/
/** @addtogroup Exported_macros
* @{
*/
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
#define READ_BIT(REG, BIT) ((REG) & (BIT))
#define CLEAR_REG(REG) ((REG) = (0x0))
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
#define READ_REG(REG) ((REG))
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
/* Use of CMSIS compiler intrinsics for register exclusive access */
/* Atomic 32-bit register access macro to set one or several bits */
#define ATOMIC_SET_BIT(REG, BIT) \
do { \
uint32_t val; \
do { \
val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
} while(0)
/* Atomic 32-bit register access macro to clear one or several bits */
#define ATOMIC_CLEAR_BIT(REG, BIT) \
do { \
uint32_t val; \
do { \
val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
} while(0)
/* Atomic 32-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
do { \
uint32_t val; \
do { \
val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
} while(0)
/* Atomic 16-bit register access macro to set one or several bits */
#define ATOMIC_SETH_BIT(REG, BIT) \
do { \
uint16_t val; \
do { \
val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
} while(0)
/* Atomic 16-bit register access macro to clear one or several bits */
#define ATOMIC_CLEARH_BIT(REG, BIT) \
do { \
uint16_t val; \
do { \
val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
} while(0)
/* Atomic 16-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
do { \
uint16_t val; \
do { \
val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
} while(0)
/**
* @}
*/
#if defined (USE_HAL_DRIVER)
#include "stm32h7xx_hal.h"
#endif /* USE_HAL_DRIVER */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* STM32H7xx_H */
/**
* @}
*/
/**
* @}
*/
@@ -0,0 +1,108 @@
/**
******************************************************************************
* @file system_stm32h7xx.h
* @author MCD Application Team
* @brief CMSIS Cortex-Mx Device System Source File for STM32H7xx devices.
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32h7xx_system
* @{
*/
/**
* @brief Define to prevent recursive inclusion
*/
#ifndef SYSTEM_STM32H7XX_H
#define SYSTEM_STM32H7XX_H
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup STM32H7xx_System_Includes
* @{
*/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Exported_types
* @{
*/
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
Note: If you use this function to configure the system clock; then there
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
*/
extern uint32_t SystemCoreClock; /*!< System Domain1 Clock Frequency */
extern uint32_t SystemD2Clock; /*!< System Domain2 Clock Frequency */
extern const uint8_t D1CorePrescTable[16] ; /*!< D1CorePrescTable prescalers table values */
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Exported_Constants
* @{
*/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Exported_Macros
* @{
*/
/**
* @}
*/
/** @addtogroup STM32H7xx_System_Exported_Functions
* @{
*/
extern void SystemInit(void);
extern void SystemCoreClockUpdate(void);
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
extern void ExitRun0Mode(void) __attribute__((optimize("Os")));
#else
extern void ExitRun0Mode(void);
#endif /* __GNUC__ */
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* SYSTEM_STM32H7XX_H */
/**
* @}
*/
/**
* @}
*/
@@ -0,0 +1,6 @@
This software component is provided to you as part of a software package and
applicable license terms are in the Package_license file. If you received this
software component outside of a package or without applicable license terms,
the terms of the Apache-2.0 license shall apply.
You may obtain a copy of the Apache-2.0 at:
https://opensource.org/licenses/Apache-2.0
@@ -0,0 +1,441 @@
/******************************************************************************
* @file cachel1_armv7.h
* @brief CMSIS Level 1 Cache API for Armv7-M and later
* @version V1.0.3
* @date 17. March 2023
******************************************************************************/
/*
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined ( __ICCARM__ )
#pragma system_include /* treat file as system include file for MISRA check */
#elif defined (__clang__)
#pragma clang system_header /* treat file as system include file */
#endif
#ifndef ARM_CACHEL1_ARMV7_H
#define ARM_CACHEL1_ARMV7_H
/**
\ingroup CMSIS_Core_FunctionInterface
\defgroup CMSIS_Core_CacheFunctions Cache Functions
\brief Functions that configure Instruction and Data cache.
@{
*/
/* Cache Size ID Register Macros */
#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos )
#ifndef __SCB_DCACHE_LINE_SIZE
#define __SCB_DCACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
#endif
#ifndef __SCB_ICACHE_LINE_SIZE
#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
#endif
/**
\brief Enable I-Cache
\details Turns on I-Cache
*/
__STATIC_FORCEINLINE void SCB_EnableICache (void)
{
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */
__DSB();
__ISB();
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
__DSB();
__ISB();
SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
__DSB();
__ISB();
#endif
}
/**
\brief Disable I-Cache
\details Turns off I-Cache
*/
__STATIC_FORCEINLINE void SCB_DisableICache (void)
{
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
__DSB();
__ISB();
SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
__DSB();
__ISB();
#endif
}
/**
\brief Invalidate I-Cache
\details Invalidates I-Cache
*/
__STATIC_FORCEINLINE void SCB_InvalidateICache (void)
{
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
__DSB();
__ISB();
SCB->ICIALLU = 0UL;
__DSB();
__ISB();
#endif
}
/**
\brief I-Cache Invalidate by address
\details Invalidates I-Cache for the given address.
I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
I-Cache memory blocks which are part of given address + given size are invalidated.
\param[in] addr address
\param[in] isize size of memory block (in number of bytes)
*/
__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (volatile void *addr, int32_t isize)
{
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
if ( isize > 0 ) {
int32_t op_size = isize + (((uint32_t)addr) & (__SCB_ICACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_ICACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->ICIMVAU = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_ICACHE_LINE_SIZE;
op_size -= __SCB_ICACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}
/**
\brief Enable D-Cache
\details Turns on D-Cache
*/
__STATIC_FORCEINLINE void SCB_EnableDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
ccsidr = SCB->CCSIDR;
/* invalidate D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();
SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
__DSB();
__ISB();
#endif
}
/**
\brief Disable D-Cache
\details Turns off D-Cache
*/
__STATIC_FORCEINLINE void SCB_DisableDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
struct {
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
} locals
#if ((defined(__GNUC__) || defined(__clang__)) && !defined(__OPTIMIZE__))
__ALIGNED(__SCB_DCACHE_LINE_SIZE)
#endif
;
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */
__DSB();
#if !defined(__OPTIMIZE__)
/*
* For the endless loop issue with no optimization builds.
* More details, see https://github.com/ARM-software/CMSIS_5/issues/620
*
* The issue only happens when local variables are in stack. If
* local variables are saved in general purpose register, then the function
* is OK.
*
* When local variables are in stack, after disabling the cache, flush the
* local variables cache line for data consistency.
*/
/* Clean and invalidate the local variable cache. */
#if defined(__ICCARM__)
/* As we can't align the stack to the cache line size, invalidate each of the variables */
SCB->DCCIMVAC = (uint32_t)&locals.sets;
SCB->DCCIMVAC = (uint32_t)&locals.ways;
SCB->DCCIMVAC = (uint32_t)&locals.ccsidr;
#else
SCB->DCCIMVAC = (uint32_t)&locals;
#endif
__DSB();
__ISB();
#endif
locals.ccsidr = SCB->CCSIDR;
/* clean & invalidate D-Cache */
locals.sets = (uint32_t)(CCSIDR_SETS(locals.ccsidr));
do {
locals.ways = (uint32_t)(CCSIDR_WAYS(locals.ccsidr));
do {
SCB->DCCISW = (((locals.sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
((locals.ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (locals.ways-- != 0U);
} while(locals.sets-- != 0U);
__DSB();
__ISB();
#endif
}
/**
\brief Invalidate D-Cache
\details Invalidates D-Cache
*/
__STATIC_FORCEINLINE void SCB_InvalidateDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
ccsidr = SCB->CCSIDR;
/* invalidate D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();
__ISB();
#endif
}
/**
\brief Clean D-Cache
\details Cleans D-Cache
*/
__STATIC_FORCEINLINE void SCB_CleanDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
ccsidr = SCB->CCSIDR;
/* clean D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) |
((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();
__ISB();
#endif
}
/**
\brief Clean & Invalidate D-Cache
\details Cleans and Invalidates D-Cache
*/
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
ccsidr = SCB->CCSIDR;
/* clean & invalidate D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();
__ISB();
#endif
}
/**
\brief D-Cache Invalidate by address
\details Invalidates D-Cache for the given address.
D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
D-Cache memory blocks which are part of given address + given size are invalidated.
\param[in] addr address
\param[in] dsize size of memory block (in number of bytes)
*/
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
if ( dsize > 0 ) {
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_DCACHE_LINE_SIZE;
op_size -= __SCB_DCACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}
/**
\brief D-Cache Clean by address
\details Cleans D-Cache for the given address
D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity.
D-Cache memory blocks which are part of given address + given size are cleaned.
\param[in] addr address
\param[in] dsize size of memory block (in number of bytes)
*/
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void *addr, int32_t dsize)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
if ( dsize > 0 ) {
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_DCACHE_LINE_SIZE;
op_size -= __SCB_DCACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}
/**
\brief D-Cache Clean and Invalidate by address
\details Cleans and invalidates D_Cache for the given address
D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity.
D-Cache memory blocks which are part of given address + given size are cleaned and invalidated.
\param[in] addr address (aligned to 32-byte boundary)
\param[in] dsize size of memory block (in number of bytes)
*/
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
if ( dsize > 0 ) {
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_DCACHE_LINE_SIZE;
op_size -= __SCB_DCACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}
/*@} end of CMSIS_Core_CacheFunctions */
#endif /* ARM_CACHEL1_ARMV7_H */
@@ -0,0 +1,888 @@
/**************************************************************************//**
* @file cmsis_armcc.h
* @brief CMSIS compiler ARMCC (Arm Compiler 5) header file
* @version V5.3.2
* @date 27. May 2021
******************************************************************************/
/*
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __CMSIS_ARMCC_H
#define __CMSIS_ARMCC_H
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677)
#error "Please use Arm Compiler Toolchain V4.0.677 or later!"
#endif
/* CMSIS compiler control architecture macros */
#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \
(defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) )
#define __ARM_ARCH_6M__ 1
#endif
#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1))
#define __ARM_ARCH_7M__ 1
#endif
#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))
#define __ARM_ARCH_7EM__ 1
#endif
/* __ARM_ARCH_8M_BASE__ not applicable */
/* __ARM_ARCH_8M_MAIN__ not applicable */
/* __ARM_ARCH_8_1M_MAIN__ not applicable */
/* CMSIS compiler control DSP macros */
#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
#define __ARM_FEATURE_DSP 1
#endif
/* CMSIS compiler specific defines */
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE __inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static __inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE static __forceinline
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __declspec(noreturn)
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __attribute__((packed))
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT __packed struct
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION __packed union
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
#define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x)))
#endif
#ifndef __UNALIGNED_UINT16_WRITE
#define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
#define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr)))
#endif
#ifndef __UNALIGNED_UINT32_WRITE
#define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
#define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr)))
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif
#ifndef __RESTRICT
#define __RESTRICT __restrict
#endif
#ifndef __COMPILER_BARRIER
#define __COMPILER_BARRIER() __memory_changed()
#endif
/* ######################### Startup and Lowlevel Init ######################## */
#ifndef __PROGRAM_START
#define __PROGRAM_START __main
#endif
#ifndef __INITIAL_SP
#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit
#endif
#ifndef __STACK_LIMIT
#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base
#endif
#ifndef __VECTOR_TABLE
#define __VECTOR_TABLE __Vectors
#endif
#ifndef __VECTOR_TABLE_ATTRIBUTE
#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section("RESET")))
#endif
/* ########################## Core Instruction Access ######################### */
/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
Access to dedicated instructions
@{
*/
/**
\brief No Operation
\details No Operation does nothing. This instruction can be used for code alignment purposes.
*/
#define __NOP __nop
/**
\brief Wait For Interrupt
\details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
*/
#define __WFI __wfi
/**
\brief Wait For Event
\details Wait For Event is a hint instruction that permits the processor to enter
a low-power state until one of a number of events occurs.
*/
#define __WFE __wfe
/**
\brief Send Event
\details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
*/
#define __SEV __sev
/**
\brief Instruction Synchronization Barrier
\details Instruction Synchronization Barrier flushes the pipeline in the processor,
so that all instructions following the ISB are fetched from cache or memory,
after the instruction has been completed.
*/
#define __ISB() __isb(0xF)
/**
\brief Data Synchronization Barrier
\details Acts as a special kind of Data Memory Barrier.
It completes when all explicit memory accesses before this instruction complete.
*/
#define __DSB() __dsb(0xF)
/**
\brief Data Memory Barrier
\details Ensures the apparent order of the explicit memory operations before
and after the instruction, without ensuring their completion.
*/
#define __DMB() __dmb(0xF)
/**
\brief Reverse byte order (32 bit)
\details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412.
\param [in] value Value to reverse
\return Reversed value
*/
#define __REV __rev
/**
\brief Reverse byte order (16 bit)
\details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856.
\param [in] value Value to reverse
\return Reversed value
*/
#ifndef __NO_EMBEDDED_ASM
__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
{
rev16 r0, r0
bx lr
}
#endif
/**
\brief Reverse byte order (16 bit)
\details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000.
\param [in] value Value to reverse
\return Reversed value
*/
#ifndef __NO_EMBEDDED_ASM
__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int16_t __REVSH(int16_t value)
{
revsh r0, r0
bx lr
}
#endif
/**
\brief Rotate Right in unsigned value (32 bit)
\details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
\param [in] op1 Value to rotate
\param [in] op2 Number of Bits to rotate
\return Rotated value
*/
#define __ROR __ror
/**
\brief Breakpoint
\details Causes the processor to enter Debug state.
Debug tools can use this to investigate system state when the instruction at a particular address is reached.
\param [in] value is ignored by the processor.
If required, a debugger can use it to store additional information about the breakpoint.
*/
#define __BKPT(value) __breakpoint(value)
/**
\brief Reverse bit order of value
\details Reverses the bit order of the given value.
\param [in] value Value to reverse
\return Reversed value
*/
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
#define __RBIT __rbit
#else
__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
{
uint32_t result;
uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */
result = value; /* r will be reversed bits of v; first get LSB of v */
for (value >>= 1U; value != 0U; value >>= 1U)
{
result <<= 1U;
result |= value & 1U;
s--;
}
result <<= s; /* shift when v's highest bits are zero */
return result;
}
#endif
/**
\brief Count leading zeros
\details Counts the number of leading zeros of a data value.
\param [in] value Value to count the leading zeros
\return number of leading zeros in value
*/
#define __CLZ __clz
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
/**
\brief LDR Exclusive (8 bit)
\details Executes a exclusive LDR instruction for 8 bit value.
\param [in] ptr Pointer to data
\return value of type uint8_t at (*ptr)
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr))
#else
#define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop")
#endif
/**
\brief LDR Exclusive (16 bit)
\details Executes a exclusive LDR instruction for 16 bit values.
\param [in] ptr Pointer to data
\return value of type uint16_t at (*ptr)
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __LDREXH(ptr) ((uint16_t) __ldrex(ptr))
#else
#define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop")
#endif
/**
\brief LDR Exclusive (32 bit)
\details Executes a exclusive LDR instruction for 32 bit values.
\param [in] ptr Pointer to data
\return value of type uint32_t at (*ptr)
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr))
#else
#define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop")
#endif
/**
\brief STR Exclusive (8 bit)
\details Executes a exclusive STR instruction for 8 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
\return 0 Function succeeded
\return 1 Function failed
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __STREXB(value, ptr) __strex(value, ptr)
#else
#define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
#endif
/**
\brief STR Exclusive (16 bit)
\details Executes a exclusive STR instruction for 16 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
\return 0 Function succeeded
\return 1 Function failed
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __STREXH(value, ptr) __strex(value, ptr)
#else
#define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
#endif
/**
\brief STR Exclusive (32 bit)
\details Executes a exclusive STR instruction for 32 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
\return 0 Function succeeded
\return 1 Function failed
*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
#define __STREXW(value, ptr) __strex(value, ptr)
#else
#define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
#endif
/**
\brief Remove the exclusive lock
\details Removes the exclusive lock which is created by LDREX.
*/
#define __CLREX __clrex
/**
\brief Signed Saturate
\details Saturates a signed value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (1..32)
\return Saturated value
*/
#define __SSAT __ssat
/**
\brief Unsigned Saturate
\details Saturates an unsigned value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (0..31)
\return Saturated value
*/
#define __USAT __usat
/**
\brief Rotate Right with Extend (32 bit)
\details Moves each bit of a bitstring right by one bit.
The carry input is shifted in at the left end of the bitstring.
\param [in] value Value to rotate
\return Rotated value
*/
#ifndef __NO_EMBEDDED_ASM
__attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value)
{
rrx r0, r0
bx lr
}
#endif
/**
\brief LDRT Unprivileged (8 bit)
\details Executes a Unprivileged LDRT instruction for 8 bit value.
\param [in] ptr Pointer to data
\return value of type uint8_t at (*ptr)
*/
#define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr))
/**
\brief LDRT Unprivileged (16 bit)
\details Executes a Unprivileged LDRT instruction for 16 bit values.
\param [in] ptr Pointer to data
\return value of type uint16_t at (*ptr)
*/
#define __LDRHT(ptr) ((uint16_t) __ldrt(ptr))
/**
\brief LDRT Unprivileged (32 bit)
\details Executes a Unprivileged LDRT instruction for 32 bit values.
\param [in] ptr Pointer to data
\return value of type uint32_t at (*ptr)
*/
#define __LDRT(ptr) ((uint32_t ) __ldrt(ptr))
/**
\brief STRT Unprivileged (8 bit)
\details Executes a Unprivileged STRT instruction for 8 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
*/
#define __STRBT(value, ptr) __strt(value, ptr)
/**
\brief STRT Unprivileged (16 bit)
\details Executes a Unprivileged STRT instruction for 16 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
*/
#define __STRHT(value, ptr) __strt(value, ptr)
/**
\brief STRT Unprivileged (32 bit)
\details Executes a Unprivileged STRT instruction for 32 bit values.
\param [in] value Value to store
\param [in] ptr Pointer to location
*/
#define __STRT(value, ptr) __strt(value, ptr)
#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
/**
\brief Signed Saturate
\details Saturates a signed value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (1..32)
\return Saturated value
*/
__attribute__((always_inline)) __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat)
{
if ((sat >= 1U) && (sat <= 32U))
{
const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U);
const int32_t min = -1 - max ;
if (val > max)
{
return max;
}
else if (val < min)
{
return min;
}
}
return val;
}
/**
\brief Unsigned Saturate
\details Saturates an unsigned value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (0..31)
\return Saturated value
*/
__attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat)
{
if (sat <= 31U)
{
const uint32_t max = ((1U << sat) - 1U);
if (val > (int32_t)max)
{
return max;
}
else if (val < 0)
{
return 0U;
}
}
return (uint32_t)val;
}
#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
/* ########################### Core Function Access ########################### */
/** \ingroup CMSIS_Core_FunctionInterface
\defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
@{
*/
/**
\brief Enable IRQ Interrupts
\details Enables IRQ interrupts by clearing special-purpose register PRIMASK.
Can only be executed in Privileged modes.
*/
/* intrinsic void __enable_irq(); */
/**
\brief Disable IRQ Interrupts
\details Disables IRQ interrupts by setting special-purpose register PRIMASK.
Can only be executed in Privileged modes.
*/
/* intrinsic void __disable_irq(); */
/**
\brief Get Control Register
\details Returns the content of the Control Register.
\return Control Register value
*/
__STATIC_INLINE uint32_t __get_CONTROL(void)
{
register uint32_t __regControl __ASM("control");
return(__regControl);
}
/**
\brief Set Control Register
\details Writes the given value to the Control Register.
\param [in] control Control Register value to set
*/
__STATIC_INLINE void __set_CONTROL(uint32_t control)
{
register uint32_t __regControl __ASM("control");
__regControl = control;
__ISB();
}
/**
\brief Get IPSR Register
\details Returns the content of the IPSR Register.
\return IPSR Register value
*/
__STATIC_INLINE uint32_t __get_IPSR(void)
{
register uint32_t __regIPSR __ASM("ipsr");
return(__regIPSR);
}
/**
\brief Get APSR Register
\details Returns the content of the APSR Register.
\return APSR Register value
*/
__STATIC_INLINE uint32_t __get_APSR(void)
{
register uint32_t __regAPSR __ASM("apsr");
return(__regAPSR);
}
/**
\brief Get xPSR Register
\details Returns the content of the xPSR Register.
\return xPSR Register value
*/
__STATIC_INLINE uint32_t __get_xPSR(void)
{
register uint32_t __regXPSR __ASM("xpsr");
return(__regXPSR);
}
/**
\brief Get Process Stack Pointer
\details Returns the current value of the Process Stack Pointer (PSP).
\return PSP Register value
*/
__STATIC_INLINE uint32_t __get_PSP(void)
{
register uint32_t __regProcessStackPointer __ASM("psp");
return(__regProcessStackPointer);
}
/**
\brief Set Process Stack Pointer
\details Assigns the given value to the Process Stack Pointer (PSP).
\param [in] topOfProcStack Process Stack Pointer value to set
*/
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{
register uint32_t __regProcessStackPointer __ASM("psp");
__regProcessStackPointer = topOfProcStack;
}
/**
\brief Get Main Stack Pointer
\details Returns the current value of the Main Stack Pointer (MSP).
\return MSP Register value
*/
__STATIC_INLINE uint32_t __get_MSP(void)
{
register uint32_t __regMainStackPointer __ASM("msp");
return(__regMainStackPointer);
}
/**
\brief Set Main Stack Pointer
\details Assigns the given value to the Main Stack Pointer (MSP).
\param [in] topOfMainStack Main Stack Pointer value to set
*/
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{
register uint32_t __regMainStackPointer __ASM("msp");
__regMainStackPointer = topOfMainStack;
}
/**
\brief Get Priority Mask
\details Returns the current state of the priority mask bit from the Priority Mask Register.
\return Priority Mask value
*/
__STATIC_INLINE uint32_t __get_PRIMASK(void)
{
register uint32_t __regPriMask __ASM("primask");
return(__regPriMask);
}
/**
\brief Set Priority Mask
\details Assigns the given value to the Priority Mask Register.
\param [in] priMask Priority Mask
*/
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
{
register uint32_t __regPriMask __ASM("primask");
__regPriMask = (priMask);
}
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
/**
\brief Enable FIQ
\details Enables FIQ interrupts by clearing special-purpose register FAULTMASK.
Can only be executed in Privileged modes.
*/
#define __enable_fault_irq __enable_fiq
/**
\brief Disable FIQ
\details Disables FIQ interrupts by setting special-purpose register FAULTMASK.
Can only be executed in Privileged modes.
*/
#define __disable_fault_irq __disable_fiq
/**
\brief Get Base Priority
\details Returns the current value of the Base Priority register.
\return Base Priority register value
*/
__STATIC_INLINE uint32_t __get_BASEPRI(void)
{
register uint32_t __regBasePri __ASM("basepri");
return(__regBasePri);
}
/**
\brief Set Base Priority
\details Assigns the given value to the Base Priority register.
\param [in] basePri Base Priority value to set
*/
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
{
register uint32_t __regBasePri __ASM("basepri");
__regBasePri = (basePri & 0xFFU);
}
/**
\brief Set Base Priority with condition
\details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
or the new value increases the BASEPRI priority level.
\param [in] basePri Base Priority value to set
*/
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
{
register uint32_t __regBasePriMax __ASM("basepri_max");
__regBasePriMax = (basePri & 0xFFU);
}
/**
\brief Get Fault Mask
\details Returns the current value of the Fault Mask register.
\return Fault Mask register value
*/
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
{
register uint32_t __regFaultMask __ASM("faultmask");
return(__regFaultMask);
}
/**
\brief Set Fault Mask
\details Assigns the given value to the Fault Mask register.
\param [in] faultMask Fault Mask value to set
*/
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
{
register uint32_t __regFaultMask __ASM("faultmask");
__regFaultMask = (faultMask & (uint32_t)1U);
}
#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
/**
\brief Get FPSCR
\details Returns the current value of the Floating Point Status/Control register.
\return Floating Point Status/Control register value
*/
__STATIC_INLINE uint32_t __get_FPSCR(void)
{
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
register uint32_t __regfpscr __ASM("fpscr");
return(__regfpscr);
#else
return(0U);
#endif
}
/**
\brief Set FPSCR
\details Assigns the given value to the Floating Point Status/Control register.
\param [in] fpscr Floating Point Status/Control value to set
*/
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
{
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
register uint32_t __regfpscr __ASM("fpscr");
__regfpscr = (fpscr);
#else
(void)fpscr;
#endif
}
/*@} end of CMSIS_Core_RegAccFunctions */
/* ################### Compiler specific Intrinsics ########################### */
/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
Access to dedicated SIMD instructions
@{
*/
#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
#define __SADD8 __sadd8
#define __QADD8 __qadd8
#define __SHADD8 __shadd8
#define __UADD8 __uadd8
#define __UQADD8 __uqadd8
#define __UHADD8 __uhadd8
#define __SSUB8 __ssub8
#define __QSUB8 __qsub8
#define __SHSUB8 __shsub8
#define __USUB8 __usub8
#define __UQSUB8 __uqsub8
#define __UHSUB8 __uhsub8
#define __SADD16 __sadd16
#define __QADD16 __qadd16
#define __SHADD16 __shadd16
#define __UADD16 __uadd16
#define __UQADD16 __uqadd16
#define __UHADD16 __uhadd16
#define __SSUB16 __ssub16
#define __QSUB16 __qsub16
#define __SHSUB16 __shsub16
#define __USUB16 __usub16
#define __UQSUB16 __uqsub16
#define __UHSUB16 __uhsub16
#define __SASX __sasx
#define __QASX __qasx
#define __SHASX __shasx
#define __UASX __uasx
#define __UQASX __uqasx
#define __UHASX __uhasx
#define __SSAX __ssax
#define __QSAX __qsax
#define __SHSAX __shsax
#define __USAX __usax
#define __UQSAX __uqsax
#define __UHSAX __uhsax
#define __USAD8 __usad8
#define __USADA8 __usada8
#define __SSAT16 __ssat16
#define __USAT16 __usat16
#define __UXTB16 __uxtb16
#define __UXTAB16 __uxtab16
#define __SXTB16 __sxtb16
#define __SXTAB16 __sxtab16
#define __SMUAD __smuad
#define __SMUADX __smuadx
#define __SMLAD __smlad
#define __SMLADX __smladx
#define __SMLALD __smlald
#define __SMLALDX __smlaldx
#define __SMUSD __smusd
#define __SMUSDX __smusdx
#define __SMLSD __smlsd
#define __SMLSDX __smlsdx
#define __SMLSLD __smlsld
#define __SMLSLDX __smlsldx
#define __SEL __sel
#define __QADD __qadd
#define __QSUB __qsub
#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )
#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
((int64_t)(ARG3) << 32U) ) >> 32U))
#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3))
#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
/*@} end of group CMSIS_SIMD_intrinsics */
#endif /* __CMSIS_ARMCC_H */
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,283 @@
/**************************************************************************//**
* @file cmsis_compiler.h
* @brief CMSIS compiler generic header file
* @version V5.1.0
* @date 09. October 2018
******************************************************************************/
/*
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __CMSIS_COMPILER_H
#define __CMSIS_COMPILER_H
#include <stdint.h>
/*
* Arm Compiler 4/5
*/
#if defined ( __CC_ARM )
#include "cmsis_armcc.h"
/*
* Arm Compiler 6.6 LTM (armclang)
*/
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) && (__ARMCC_VERSION < 6100100)
#include "cmsis_armclang_ltm.h"
/*
* Arm Compiler above 6.10.1 (armclang)
*/
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
#include "cmsis_armclang.h"
/*
* GNU Compiler
*/
#elif defined ( __GNUC__ )
#include "cmsis_gcc.h"
/*
* IAR Compiler
*/
#elif defined ( __ICCARM__ )
#include <cmsis_iccarm.h>
/*
* TI Arm Compiler
*/
#elif defined ( __TI_ARM__ )
#include <cmsis_ccs.h>
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __attribute__((packed))
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __attribute__((packed))
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION union __attribute__((packed))
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif
#ifndef __RESTRICT
#define __RESTRICT __restrict
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
/*
* TASKING Compiler
*/
#elif defined ( __TASKING__ )
/*
* The CMSIS functions have been implemented as intrinsics in the compiler.
* Please use "carm -?i" to get an up to date list of all intrinsics,
* Including the CMSIS ones.
*/
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __packed__
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __packed__
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION union __packed__
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __packed__ T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __align(x)
#endif
#ifndef __RESTRICT
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
#define __RESTRICT
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
/*
* COSMIC Compiler
*/
#elif defined ( __CSMC__ )
#include <cmsis_csm.h>
#ifndef __ASM
#define __ASM _asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
// NO RETURN is automatically detected hence no warning here
#define __NO_RETURN
#endif
#ifndef __USED
#warning No compiler specific solution for __USED. __USED is ignored.
#define __USED
#endif
#ifndef __WEAK
#define __WEAK __weak
#endif
#ifndef __PACKED
#define __PACKED @packed
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT @packed struct
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION @packed union
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
@packed struct T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
#define __ALIGNED(x)
#endif
#ifndef __RESTRICT
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
#define __RESTRICT
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
#else
#error Unknown compiler.
#endif
#endif /* __CMSIS_COMPILER_H */
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,39 @@
/**************************************************************************//**
* @file cmsis_version.h
* @brief CMSIS Core(M) Version definitions
* @version V5.0.5
* @date 02. February 2022
******************************************************************************/
/*
* Copyright (c) 2009-2022 ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined ( __ICCARM__ )
#pragma system_include /* treat file as system include file for MISRA check */
#elif defined (__clang__)
#pragma clang system_header /* treat file as system include file */
#endif
#ifndef __CMSIS_VERSION_H
#define __CMSIS_VERSION_H
/* CMSIS Version definitions */
#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
#define __CM_CMSIS_VERSION_SUB ( 6U) /*!< [15:0] CMSIS Core(M) sub version */
#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
__CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
#endif
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Loaded 100 of 1978 files, more files were not shown because too many files have changed in this diff. Show more