From e45736fee1510e8fec3c730d8e16f24625dbe558 Mon Sep 17 00:00:00 2001 From: Lorenzo Cucchi <lorenzo.cucchi@skywarder.eu> Date: Thu, 18 May 2023 20:59:55 +0200 Subject: [PATCH] [Miosix] Added support for stm32f756 nucleo --- .vscode/c_cpp_properties.json | 5 +++-- CMakeLists.txt | 2 +- libs/miosix-kernel | 2 +- src/shared/drivers/adc/InternalADC.cpp | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 348a5b480..dcccec4cb 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -60,7 +60,7 @@ "${defaultIncludePaths}", "${workspaceFolder}/libs/miosix-kernel/miosix/arch/cortexM4_stm32f4/common", "${workspaceFolder}/libs/miosix-kernel/miosix/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery", - "${workspaceFolder}/libs/miosix-kernel/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery", + "${workspaceFolder}/libs/miosix-kernel/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery" ] }, { @@ -358,7 +358,8 @@ "${defaultIncludePaths}", "${workspaceFolder}/libs/miosix-kernel/miosix/arch/cortexM7_stm32f7/common", "${workspaceFolder}/libs/miosix-kernel/miosix/arch/cortexM7_stm32f7/stm32f767zi_nucleo", - "${workspaceFolder}/libs/miosix-kernel/miosix/config/arch/cortexM7_stm32f7/stm32f767zi_nucleo" + "${workspaceFolder}/libs/miosix-kernel/miosix/config/arch/cortexM7_stm32f7/stm32f767zi_nucleo", + "${workspaceFolder}/libs/miosix-kernel/miosix/arch/common/CMSIS/Include" ] }, { diff --git a/CMakeLists.txt b/CMakeLists.txt index 0772a8044..124b25d12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,7 @@ add_executable(test-sensormanager src/tests/test-sensormanager.cpp) sbs_target(test-sensormanager stm32f429zi_skyward_death_stack_x) add_executable(test-serial src/tests/test-serial.cpp) -sbs_target(test-serial stm32f767zi_compute_unit) +sbs_target(test-serial stm32f756zg_nucleo) add_executable(test-taskscheduler src/tests/scheduler/test-taskscheduler.cpp) sbs_target(test-taskscheduler stm32f407vg_stm32f4discovery) diff --git a/libs/miosix-kernel b/libs/miosix-kernel index ca9c636f8..8e232378f 160000 --- a/libs/miosix-kernel +++ b/libs/miosix-kernel @@ -1 +1 @@ -Subproject commit ca9c636f88fb58243847d9dca9cc1c000dcadeb5 +Subproject commit 8e232378f498d55d811c328e75e028b8e2d75877 diff --git a/src/shared/drivers/adc/InternalADC.cpp b/src/shared/drivers/adc/InternalADC.cpp index eba199a63..b4c63d4bb 100644 --- a/src/shared/drivers/adc/InternalADC.cpp +++ b/src/shared/drivers/adc/InternalADC.cpp @@ -36,7 +36,7 @@ namespace Boardcore static const float CAL_PT1_TEMP = 30; static const float CAL_PT2_TEMP = 110; static const float CAL_V_DDA = 3.3f; -#elif defined(STM32F767xx) || defined(STM32F769xx) +#elif defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F756xx) #define CAL_PT1_VALUE ((uint16_t volatile *)((uint32_t)0x1FF0F44C)) #define CAL_PT2_VALUE ((uint16_t volatile *)((uint32_t)0x1FF0F44E)) static const float CAL_PT1_TEMP = 30; @@ -50,7 +50,8 @@ static const float CAL_V_DDA = 3.3f; static const InternalADC::Channel TEMP_CH = InternalADC::CH16; static const InternalADC::Channel VBAT_CH = InternalADC::CH18; static const float VBAT_DIV = 2.0f; -#elif defined(STM32F429xx) || defined(STM32F767xx) || defined(STM32F769xx) +#elif defined(STM32F429xx) || defined(STM32F767xx) || defined(STM32F769xx) || \ + defined(STM32F756xx) static const InternalADC::Channel TEMP_CH = InternalADC::CH18; static const InternalADC::Channel VBAT_CH = InternalADC::CH18; static const float VBAT_DIV = 4.0f; -- GitLab