diff --git a/miosix/arch/common/core/interrupts.h b/miosix/arch/common/core/interrupts.h index cb8afb230b60a6dafe6ab5068111a12446f6c460..0402be32d196d706b715e18867af8ca9af9ec4b2 100644 --- a/miosix/arch/common/core/interrupts.h +++ b/miosix/arch/common/core/interrupts.h @@ -13,11 +13,3 @@ #else #error "Unknown arch" #endif - -// Cortex M0 and M0+ does not have some SCB registers, in order to avoid -// compilation issues a flag is defined to disable code that accesses to -// registers not present in these families - -#if defined(_ARCH_CORTEXM0_STM32F0) -#define _ARCH_CORTEXM0 -#endif diff --git a/miosix/arch/common/core/interrupts_cortexMx.cpp b/miosix/arch/common/core/interrupts_cortexMx.cpp index dd05ebdeaca6a7ee7a58b498e6b5a7752a0bae9f..fbfcc8f97b9c7465bb38a525f588cf8b940c6528 100644 --- a/miosix/arch/common/core/interrupts_cortexMx.cpp +++ b/miosix/arch/common/core/interrupts_cortexMx.cpp @@ -99,20 +99,20 @@ void __attribute__((noinline)) HardFault_impl() #ifdef WITH_ERRLOG IRQerrorLog("\r\n***Unexpected HardFault @ "); printUnsignedInt(getProgramCounter()); - #ifndef _ARCH_CORTEXM0 + #if !defined(_ARCH_CORTEXM0_STM32F0) && !defined(_ARCH_CORTEXM0_STM32G0) && !defined(_ARCH_CORTEXM0_STM32L0) unsigned int hfsr=SCB->HFSR; if(hfsr & 0x40000000) //SCB_HFSR_FORCED IRQerrorLog("Fault escalation occurred\r\n"); if(hfsr & 0x00000002) //SCB_HFSR_VECTTBL IRQerrorLog("A BusFault occurred during a vector table read\r\n"); - #endif //_ARCH_CORTEXM0 + #endif // !_ARCH_CORTEXM0_STM32F0 && !_ARCH_CORTEXM0_STM32G0 && !_ARCH_CORTEXM0_STM32L0 #endif //WITH_ERRLOG miosix_private::IRQsystemReboot(); } // Cortex M0/M0+ architecture does not have the interrupts handled by code // below this point -#ifndef _ARCH_CORTEXM0 +#if !defined(_ARCH_CORTEXM0_STM32F0) && !defined(_ARCH_CORTEXM0_STM32G0) && !defined(_ARCH_CORTEXM0_STM32L0) void __attribute__((naked)) MemManage_Handler() { @@ -262,7 +262,7 @@ void DebugMon_Handler() miosix_private::IRQsystemReboot(); } -#endif //_ARCH_CORTEXM0 +#endif // !_ARCH_CORTEXM0_STM32F0 && !_ARCH_CORTEXM0_STM32G0 && !_ARCH_CORTEXM0_STM32L0 void PendSV_Handler() { diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/core/stage_1_boot.cpp b/miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/core/stage_1_boot.cpp similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/core/stage_1_boot.cpp rename to miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/core/stage_1_boot.cpp diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp b/miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp rename to miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp_impl.h b/miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/interfaces-impl/bsp_impl.h similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp_impl.h rename to miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/interfaces-impl/bsp_impl.h diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h b/miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h rename to miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/stm32_64k+20k_rom.ld b/miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/stm32_64k+20k_rom.ld similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/stm32_64k+20k_rom.ld rename to miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/stm32_64k+20k_rom.ld diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/stm32vldiscovery.cfg b/miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/stm32vldiscovery.cfg similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/stm32vldiscovery.cfg rename to miosix/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/stm32vldiscovery.cfg diff --git a/miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/core/stage_1_boot.cpp b/miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/core/stage_1_boot.cpp similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/core/stage_1_boot.cpp rename to miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/core/stage_1_boot.cpp diff --git a/miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/interfaces-impl/bsp.cpp b/miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/interfaces-impl/bsp.cpp similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/interfaces-impl/bsp.cpp rename to miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/interfaces-impl/bsp.cpp diff --git a/miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/interfaces-impl/bsp_impl.h b/miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/interfaces-impl/bsp_impl.h similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/interfaces-impl/bsp_impl.h rename to miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/interfaces-impl/bsp_impl.h diff --git a/miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/interfaces-impl/hwmapping.h b/miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/interfaces-impl/hwmapping.h similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/interfaces-impl/hwmapping.h rename to miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/interfaces-impl/hwmapping.h diff --git a/miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/stm32_128k+20k_rom.ld b/miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/stm32_128k+20k_rom.ld similarity index 100% rename from miosix/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/stm32_128k+20k_rom.ld rename to miosix/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/stm32_128k+20k_rom.ld diff --git a/miosix/arch/cortexM3_stm32f2/stm32f205rc_skyward_ciuti/interfaces-impl/bsp.cpp b/miosix/arch/cortexM3_stm32f2/stm32f205rc_skyward_ciuti/interfaces-impl/bsp.cpp index fccaa1660d27e2a1b9d3ddb1c5f990f4a3f4c8bc..2298d313485beb2f02890cb8a944b06898817901 100644 --- a/miosix/arch/cortexM3_stm32f2/stm32f205rc_skyward_ciuti/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM3_stm32f2/stm32f205rc_skyward_ciuti/interfaces-impl/bsp.cpp @@ -41,7 +41,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" #include "drivers/dcc.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f407vg_skyward_tortellino/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f407vg_skyward_tortellino/interfaces-impl/bsp.cpp index f72d02000e26f15f79c9e7b2e44f51b6ff3330b6..f8b86a7c1133fc03f5a85f1aba21dbf656cdebc9 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f407vg_skyward_tortellino/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f407vg_skyward_tortellino/interfaces-impl/bsp.cpp @@ -44,7 +44,7 @@ #include "filesystem/file_access.h" #include "filesystem/console/console_device.h" #include "drivers/serial.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "board_settings.h" #include "hwmapping.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_hre_test_stand/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_hre_test_stand/interfaces-impl/bsp.cpp index 3be8347fe61b2f937e500b0088b436885874eb0f..bb9b8884d3017b0645e3d72894a13550e2a21958 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_hre_test_stand/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_hre_test_stand/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack/interfaces-impl/bsp.cpp index 783564a320b1afc2f334e77f2d9d4af566a1d301..55893a529e62c7ed61510523ccbdf2a39ebd74e6 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack/interfaces-impl/bsp.cpp @@ -44,7 +44,7 @@ #include "filesystem/file_access.h" #include "filesystem/console/console_device.h" #include "drivers/serial.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "board_settings.h" #include "hwmapping.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_v3/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_v3/interfaces-impl/bsp.cpp index e642dcc2032bfad95b7dce10edd049d6b71d2391..2789877870810cb62b463be01faab4588e444fa8 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_v3/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_v3/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x/interfaces-impl/bsp.cpp index 9e6e449fe2bd0e831231fb3e74eabde572c92ebc..4542a90faa0d0f1b2c7f6dcba4a1530fd06fafa5 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x_maker_faire/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x_maker_faire/interfaces-impl/bsp.cpp index 108263a6f2ac8092f559547414b434006b5fe877..6e9248a37966faeba3fe2c703bdb4a0b1f052d53 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x_maker_faire/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_death_stack_x_maker_faire/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation/interfaces-impl/bsp.cpp index f8672b499db31d7907bcd6b88552eba8dd7c5aad..7d90be570fa4b50335b6fc85d7b53de16a47fda8 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation/interfaces-impl/bsp.cpp @@ -44,7 +44,7 @@ #include "filesystem/file_access.h" #include "filesystem/console/console_device.h" #include "drivers/serial.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "board_settings.h" #include "hwmapping.h" // #include "kernel/IRQDisplayPrint.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_parafoil/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_parafoil/interfaces-impl/bsp.cpp index fe6906f37851c4e66cd420e22c5994320a042837..83434b015bd1a895611a36f4b3cf0b4a65df648e 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_parafoil/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_parafoil/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_v2/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_v2/interfaces-impl/bsp.cpp index 0ab256dbe94228c93fb58fd18850ff97ec3c14c2..1bee7351e31334c250aeaa029bdd231bb1d7fabc 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_v2/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_groundstation_v2/interfaces-impl/bsp.cpp @@ -44,7 +44,7 @@ #include "filesystem/file_access.h" #include "filesystem/console/console_device.h" #include "drivers/serial.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "board_settings.h" #include "hwmapping.h" // #include "kernel/IRQDisplayPrint.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_parafoil/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_parafoil/interfaces-impl/bsp.cpp index 407fd39d131b1d131d2dc50a1f041be5798e93c9..9c56ea148e4d96def2e20ee3fdb6fc251d278ced 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_parafoil/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_parafoil/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_pyxis_auxiliary/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_pyxis_auxiliary/interfaces-impl/bsp.cpp index 061176ed25de69dd0685a09a9132cd26c29e729d..a8581e1e72e362a26ce7da3a323ecf76b2b4e794 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_pyxis_auxiliary/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_pyxis_auxiliary/interfaces-impl/bsp.cpp @@ -39,7 +39,7 @@ #include "board_settings.h" #include "config/miosix_settings.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "drivers/serial.h" #include "filesystem/console/console_device.h" #include "filesystem/file_access.h" diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rogallina/interfaces-impl/bsp.cpp b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rogallina/interfaces-impl/bsp.cpp index 6a207a0b63dbc80379d59cd4bdb08b5660ebfd93..7ed2ca5f0b5a6ea811caf1cd080de018468d1bc0 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rogallina/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_skyward_rogallina/interfaces-impl/bsp.cpp @@ -44,7 +44,7 @@ #include "filesystem/file_access.h" #include "filesystem/console/console_device.h" #include "drivers/serial.h" -#include "drivers/sd_stm32f2_f4.h" +#include "drivers/sd_stm32f2_f4_f7.h" #include "board_settings.h" // #include "kernel/IRQDisplayPrint.h" diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/board_settings.h b/miosix/config/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/board_settings.h similarity index 100% rename from miosix/config/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/board_settings.h rename to miosix/config/arch/cortexM3_stm32f1/stm32f103c8_skyward_alderaan/board_settings.h diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/board_settings.h b/miosix/config/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/board_settings.h similarity index 100% rename from miosix/config/arch/cortexM3_stm32/stm32f103cb_skyward_strain_board/board_settings.h rename to miosix/config/arch/cortexM3_stm32f1/stm32f103cb_skyward_strain_board/board_settings.h diff --git a/miosix/config/options.cmake b/miosix/config/options.cmake index 53dcbdc50f4c64014d0c59b9ca5ca5bc94de62d1..5ac5f8db36e993f37983c0d978230e64e3052c7e 100644 --- a/miosix/config/options.cmake +++ b/miosix/config/options.cmake @@ -3247,7 +3247,7 @@ elseif(${ARCH} STREQUAL cortexM7_stm32h7) ## elseif(${ARCH} STREQUAL cortexM0_stm32f0) ## Base directory with else header files for this board - set(ARCH_INC arch/cortexM0_stm32/common) + set(ARCH_INC arch/cortexM0_stm32f0/common) ##------------------------------------------------------------------------- ## BOARD: stm32f072rb_stm32f0discovery @@ -3255,7 +3255,7 @@ elseif(${ARCH} STREQUAL cortexM0_stm32f0) if(${OPT_BOARD} STREQUAL stm32f072rb_stm32f0discovery) ## Base directory with header files for this board - set(BOARD_INC arch/cortexM0_stm32/stm32f072rb_stm32f0discovery) + set(BOARD_INC arch/cortexM0_stm32f0/stm32f072rb_stm32f0discovery) ## Select linker script and boot file ## Their path must be relative to the miosix directory.