diff --git a/.travis.yml b/.travis.yml index 388ed84443a..83a9f06424d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -280,7 +280,7 @@ matrix: # Check that example compiles without rtos - sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp - | - rm -r rtos/source/TARGET_CORTEX drivers/source/usb connectivity/cellular connectivity/drivers/cellular \ + rm -r cmsis/CMSIS_5/CMSIS/RTOS2 cmsis/device/rtos drivers/source/usb connectivity/cellular connectivity/drivers/cellular \ connectivity/libraries/ppp connectivity/netsocket connectivity/nanostack connectivity/lwipstack features/frameworks/greentea-client \ features/frameworks/utest features/frameworks/unity components BUILD - python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0 diff --git a/rtos/source/TARGET_CORTEX/rtx5/Include/cmsis_os2.h b/cmsis/CMSIS_5/CMSIS/RTOS2/Include/cmsis_os2.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/Include/cmsis_os2.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/Include/cmsis_os2.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/Include/os_tick.h b/cmsis/CMSIS_5/CMSIS/RTOS2/Include/os_tick.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/Include/os_tick.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/Include/os_tick.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config/RTX_Config.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config/RTX_Config.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config/RTX_Config.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config/RTX_Config.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Config/TARGET_CORTEX_A/handlers.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config/TARGET_CORTEX_A/handlers.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Config/TARGET_CORTEX_A/handlers.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config/TARGET_CORTEX_A/handlers.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Include/rtx_evr.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include/rtx_evr.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Include/rtx_evr.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include/rtx_evr.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Include/rtx_os.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include/rtx_os.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Include/rtx_os.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include/rtx_os.h diff --git a/rtos/source/TARGET_CORTEX/rtx4/cmsis_os.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include1/cmsis_os.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx4/cmsis_os.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include1/cmsis_os.h diff --git a/rtos/source/TARGET_CORTEX/rtx4/cmsis_os1.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Library/cmsis_os1.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx4/cmsis_os1.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Library/cmsis_os1.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_CORTEX_A/irq_ca.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_CORTEX_A/irq_ca.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_CORTEX_A/irq_ca.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_CORTEX_A/irq_ca.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M0/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M0/irq_cm0.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M0/irq_cm0.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M0/irq_cm0.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M0P/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M0P/irq_cm0.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M0P/irq_cm0.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M0P/irq_cm0.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M3/irq_cm3.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M3/irq_cm3.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M3/irq_cm3.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M3/irq_cm3.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/irq_cm4f.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/irq_cm4f.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/irq_cm4f.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_ARM/TARGET_RTOS_M4_M7/irq_cm4f.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_CORTEX_A/irq_ca.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_CORTEX_A/irq_ca.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_CORTEX_A/irq_ca.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_CORTEX_A/irq_ca.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M0/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M0/irq_cm0.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M0/irq_cm0.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M0/irq_cm0.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M0P/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M0P/irq_cm0.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M0P/irq_cm0.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M0P/irq_cm0.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M23/irq_armv8mbl.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M23/irq_armv8mbl.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M23/irq_armv8mbl.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M23/irq_armv8mbl.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M3/irq_cm3.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M3/irq_cm3.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M3/irq_cm3.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M3/irq_cm3.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M33/irq_armv8mml.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M33/irq_armv8mml.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M33/irq_armv8mml.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M33/irq_armv8mml.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/irq_cm4f.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/irq_cm4f.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/irq_cm4f.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/irq_cm4f.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_CORTEX_A/irq_ca.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_CORTEX_A/irq_ca.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_CORTEX_A/irq_ca.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_CORTEX_A/irq_ca.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_core_c.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_core_c.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_core_c.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_core_c.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_core_ca.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_core_ca.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_core_ca.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_core_ca.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_core_cm.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_core_cm.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_core_cm.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_core_cm.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_delay.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_delay.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_delay.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_delay.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_evflags.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_evflags.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_evflags.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_evflags.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_evr.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_evr.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_evr.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_evr.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_kernel.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_kernel.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_kernel.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_kernel.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_lib.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_lib.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.h b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_lib.h similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.h rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_lib.h diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_memory.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_memory.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_memory.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_memory.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_mempool.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_mempool.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_mempool.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_mempool.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_msgqueue.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_msgqueue.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_msgqueue.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_msgqueue.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_mutex.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_mutex.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_mutex.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_mutex.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_semaphore.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_semaphore.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_semaphore.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_semaphore.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_system.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_system.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_system.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_system.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_thread.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_thread.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_thread.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_thread.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_timer.c b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_timer.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_timer.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_timer.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/Source/os_systick.c b/cmsis/CMSIS_5/CMSIS/RTOS2/Source/os_systick.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/Source/os_systick.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/Source/os_systick.c diff --git a/rtos/source/TARGET_CORTEX/rtx5/Source/os_tick_ptim.c b/cmsis/CMSIS_5/CMSIS/RTOS2/Source/os_tick_ptim.c similarity index 100% rename from rtos/source/TARGET_CORTEX/rtx5/Source/os_tick_ptim.c rename to cmsis/CMSIS_5/CMSIS/RTOS2/Source/os_tick_ptim.c diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/mbed_lib.json b/cmsis/CMSIS_5/CMSIS/RTOS2/mbed_lib.json new file mode 100644 index 00000000000..2418275cc94 --- /dev/null +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/mbed_lib.json @@ -0,0 +1,3 @@ +{ + "name": "cmsis-cmsis5-rtos2" +} diff --git a/cmsis/TARGET_CORTEX_A/cmsis_armcc.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_armcc.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/cmsis_armcc.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_armcc.h diff --git a/cmsis/TARGET_CORTEX_A/cmsis_armclang.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_armclang.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/cmsis_armclang.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_armclang.h diff --git a/cmsis/TARGET_CORTEX_A/cmsis_compiler.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_compiler.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/cmsis_compiler.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_compiler.h diff --git a/cmsis/TARGET_CORTEX_A/cmsis_cp15.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_cp15.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/cmsis_cp15.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_cp15.h diff --git a/cmsis/TARGET_CORTEX_A/cmsis_gcc.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_gcc.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/cmsis_gcc.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_gcc.h diff --git a/cmsis/TARGET_CORTEX_A/cmsis_iccarm.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_iccarm.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/cmsis_iccarm.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/cmsis_iccarm.h diff --git a/cmsis/TARGET_CORTEX_A/core_ca.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/core_ca.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/core_ca.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/core_ca.h diff --git a/cmsis/TARGET_CORTEX_A/irq_ctrl.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/irq_ctrl.h similarity index 100% rename from cmsis/TARGET_CORTEX_A/irq_ctrl.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Include/irq_ctrl.h diff --git a/cmsis/TARGET_CORTEX_A/irq_ctrl_gic.c b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Source/irq_ctrl_gic.c similarity index 100% rename from cmsis/TARGET_CORTEX_A/irq_ctrl_gic.c rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/Source/irq_ctrl_gic.c diff --git a/cmsis/TARGET_CORTEX_M/arm_math.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/arm_math.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/arm_math.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/arm_math.h diff --git a/cmsis/TARGET_CORTEX_M/cachel1_armv7.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cachel1_armv7.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cachel1_armv7.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cachel1_armv7.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_armcc.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_armcc.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_armcc.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_armcc.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_armclang.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_armclang.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_armclang.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_armclang.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_armclang_ltm.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_armclang_ltm.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_armclang_ltm.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_armclang_ltm.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_compiler.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_compiler.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_compiler.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_compiler.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_gcc.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_gcc.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_gcc.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_iccarm.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_iccarm.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_iccarm.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_iccarm.h diff --git a/cmsis/TARGET_CORTEX_M/cmsis_version.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_version.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/cmsis_version.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/cmsis_version.h diff --git a/cmsis/TARGET_CORTEX_M/core_armv81mml.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_armv81mml.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_armv81mml.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_armv81mml.h diff --git a/cmsis/TARGET_CORTEX_M/core_armv8mbl.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_armv8mbl.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_armv8mbl.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_armv8mbl.h diff --git a/cmsis/TARGET_CORTEX_M/core_armv8mml.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_armv8mml.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_armv8mml.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_armv8mml.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm0.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm0.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm0.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm0.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm0plus.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm0plus.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm0plus.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm0plus.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm1.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm1.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm1.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm1.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm23.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm23.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm23.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm23.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm3.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm3.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm3.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm3.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm33.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm33.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm33.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm33.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm35p.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm35p.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm35p.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm35p.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm4.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm4.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm4.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm4.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm55.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm55.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm55.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm55.h diff --git a/cmsis/TARGET_CORTEX_M/core_cm7.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm7.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_cm7.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm7.h diff --git a/cmsis/TARGET_CORTEX_M/core_sc000.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_sc000.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_sc000.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_sc000.h diff --git a/cmsis/TARGET_CORTEX_M/core_sc300.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_sc300.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/core_sc300.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_sc300.h diff --git a/cmsis/TARGET_CORTEX_M/mpu_armv7.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/mpu_armv7.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/mpu_armv7.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/mpu_armv7.h diff --git a/cmsis/TARGET_CORTEX_M/mpu_armv8.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/mpu_armv8.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/mpu_armv8.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/mpu_armv8.h diff --git a/cmsis/TARGET_CORTEX_M/pmu_armv8.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/pmu_armv8.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/pmu_armv8.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/pmu_armv8.h diff --git a/cmsis/TARGET_CORTEX_M/tz_context.h b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/tz_context.h similarity index 100% rename from cmsis/TARGET_CORTEX_M/tz_context.h rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/tz_context.h diff --git a/cmsis/TARGET_CORTEX_M/mbed_tz_context.c b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Source/mbed_tz_context.c similarity index 100% rename from cmsis/TARGET_CORTEX_M/mbed_tz_context.c rename to cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Source/mbed_tz_context.c diff --git a/cmsis/README.md b/cmsis/README.md new file mode 100644 index 00000000000..e98d54ad6d4 --- /dev/null +++ b/cmsis/README.md @@ -0,0 +1,43 @@ + +# CMSIS Version 5 + +This directory contains a ported version of the upstream repository for [CMSIS_5](http://arm-software.github.io/CMSIS_5/General/html/index.html) as well as Mbed specific RTX configuration and RTOS boot source files. + +The upstream source code is imported using the Python script located at [`tools/importer/importer.py`](../tools/importer/importer.py) when passed the [`tools/importer/cmsis_importer.json`](../tools/importer/cmsis_importer.json) configuration file. +For more information on the importer script please read [`tools/importer/README.md`](../tools/importer/README.md). + +The directory is organised as follows: + +``` ++--cmsis +| +-- README.md # The present mardown file +| +-- device/ +| +-- mbed_cmsis_conf.h # Process stack configuration +| +-- RTE/ +| +-- include/ +| +-- RTE_Components.h # Run-Time-Environment Component Configuration File +| +-- rtos/ +| +-- mbed_lib.json # Mbed library configuration file +| +-- include/ +| +-- mbed_boot.h # Declares the functions that run before main() +| +-- mbed_rtx_conf.h # Changes to RTX configuration +| +-- mbed_rtx_storage.h # Declares the primitives storage types for RTX +| +-- source/ +| +-- mbed_boot.c # Implements some of the functions that run before main() +| +-- mbed_rtos_rtx.c # Implements some of the functions that run before main() +| +-- mbed_rtx_handlers.c # Implements RTX handlers +| +-- mbed_rtx_idle.cpp # Implements RTX idle loop +| +-- TOOLCHAIN_ARM_MICRO/ +| +-- mbed_boot_arm_micro.c # Mbed entry point for the uARM toolchain +| +-- TOOLCHAIN_ARM_STD/ +| +-- mbed_boot_arm_std.c # Mbed entry point for the ARM toolchain +| +-- TOOLCHAIN_GCC_ARM/ +| +-- mbed_boot_gcc_arm.c # Mbed entry point for the GCC_ARM toolchain +| +-- TOOLCHAIN_IAR/ +| +-- mbed_boot_iar.c # Mbed entry point for the IAR toolchain +| +-- CMSIS_5/ # Imported from the upstream repository as described in the importer script configuration file (cmsis_importer.json) +``` + +Two Mbed libraries live within this directory: +* `rtos` from `device/rtos` +* `cmsis-cmsis5-rtos2` from `CMSIS_5/CMSIS/RTOS2` diff --git a/cmsis/RTE_Components.h b/cmsis/device/RTE/include/RTE_Components.h similarity index 100% rename from cmsis/RTE_Components.h rename to cmsis/device/RTE/include/RTE_Components.h diff --git a/cmsis/mbed_cmsis_conf.h b/cmsis/device/mbed_cmsis_conf.h similarity index 100% rename from cmsis/mbed_cmsis_conf.h rename to cmsis/device/mbed_cmsis_conf.h diff --git a/rtos/source/TARGET_CORTEX/TOOLCHAIN_ARM_MICRO/mbed_boot_arm_micro.c b/cmsis/device/rtos/TOOLCHAIN_ARM_MICRO/mbed_boot_arm_micro.c similarity index 100% rename from rtos/source/TARGET_CORTEX/TOOLCHAIN_ARM_MICRO/mbed_boot_arm_micro.c rename to cmsis/device/rtos/TOOLCHAIN_ARM_MICRO/mbed_boot_arm_micro.c diff --git a/rtos/source/TARGET_CORTEX/TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c b/cmsis/device/rtos/TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c similarity index 100% rename from rtos/source/TARGET_CORTEX/TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c rename to cmsis/device/rtos/TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c diff --git a/rtos/source/TARGET_CORTEX/TOOLCHAIN_GCC_ARM/mbed_boot_gcc_arm.c b/cmsis/device/rtos/TOOLCHAIN_GCC_ARM/mbed_boot_gcc_arm.c similarity index 100% rename from rtos/source/TARGET_CORTEX/TOOLCHAIN_GCC_ARM/mbed_boot_gcc_arm.c rename to cmsis/device/rtos/TOOLCHAIN_GCC_ARM/mbed_boot_gcc_arm.c diff --git a/rtos/source/TARGET_CORTEX/TOOLCHAIN_IAR/mbed_boot_iar.c b/cmsis/device/rtos/TOOLCHAIN_IAR/mbed_boot_iar.c similarity index 100% rename from rtos/source/TARGET_CORTEX/TOOLCHAIN_IAR/mbed_boot_iar.c rename to cmsis/device/rtos/TOOLCHAIN_IAR/mbed_boot_iar.c diff --git a/rtos/source/TARGET_CORTEX/mbed_boot.h b/cmsis/device/rtos/include/mbed_boot.h similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_boot.h rename to cmsis/device/rtos/include/mbed_boot.h diff --git a/rtos/source/TARGET_CORTEX/mbed_rtx_conf.h b/cmsis/device/rtos/include/mbed_rtx_conf.h similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_rtx_conf.h rename to cmsis/device/rtos/include/mbed_rtx_conf.h diff --git a/rtos/source/TARGET_CORTEX/mbed_rtx_storage.h b/cmsis/device/rtos/include/mbed_rtx_storage.h similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_rtx_storage.h rename to cmsis/device/rtos/include/mbed_rtx_storage.h diff --git a/rtos/source/TARGET_CORTEX/mbed_lib.json b/cmsis/device/rtos/mbed_lib.json similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_lib.json rename to cmsis/device/rtos/mbed_lib.json diff --git a/rtos/source/TARGET_CORTEX/mbed_boot.c b/cmsis/device/rtos/source/mbed_boot.c similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_boot.c rename to cmsis/device/rtos/source/mbed_boot.c diff --git a/rtos/source/TARGET_CORTEX/mbed_rtos_rtx.c b/cmsis/device/rtos/source/mbed_rtos_rtx.c similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_rtos_rtx.c rename to cmsis/device/rtos/source/mbed_rtos_rtx.c diff --git a/rtos/source/TARGET_CORTEX/mbed_rtx_handlers.c b/cmsis/device/rtos/source/mbed_rtx_handlers.c similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_rtx_handlers.c rename to cmsis/device/rtos/source/mbed_rtx_handlers.c diff --git a/rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp b/cmsis/device/rtos/source/mbed_rtx_idle.cpp similarity index 100% rename from rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp rename to cmsis/device/rtos/source/mbed_rtx_idle.cpp diff --git a/docs/adr/0001_cmsis_component_source_structure_recommendations.md b/docs/adr/0001_cmsis_component_source_structure_recommendations.md index 9a360b9fcf2..a41b3a6a4ab 100644 --- a/docs/adr/0001_cmsis_component_source_structure_recommendations.md +++ b/docs/adr/0001_cmsis_component_source_structure_recommendations.md @@ -5,125 +5,20 @@ Date: 2020-08-19 Proposed ## Context +[`ARM-software/CMSIS_5`](https://github.com/ARM-software/CMSIS_5) has been ported to Mbed OS. However, it is split across multiple directories and it is not immediately obvious that it comes from that repository when imported with the [importer script](../../tools/importer/importer.py ). -[`ARM-software/CMSIS_5`](https://github.com/ARM-software/CMSIS_5) has been ported to Mbed OS. However, it is split across multiple directories and it is not immediately obvious that it comes from that directory. It also makes it difficult to create an independent CMake target can be built as a library that can be optionally be added by end users. +## Decision +The current proposal is to create new directories within the existing `cmsis/` directory: +* `CMSIS_5/`: mirrors closely the structure used by `ARM-software/CMSIS_5/` keeping only the directories and files needed by Mbed OS and renames some directories in order to work with Mbed OS build tools. See [importer configuration file](./../tools/importer/cmsis_importer.json). +* `device`: includes Mbed OS specific files to configure RTX. -The current proposal is to create a new directory `CMSIS_5/` at the root of the repository that will mirror closely the structure used by `ARM-software/CMSIS_5/` keeping only the directories and files needed by Mbed OS. It will also include Mbed OS specific files and rename some directories in order to work with Mbed OS build tools (see [Decision](#decision) section below). This will result in the removal of the `rtos/source/TARGET_CORTEX/` and `cmsis/` directories. +This will result in the removal of the `rtos/source/TARGET_CORTEX/` directory. +Additionally, `cmsis/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S` to `platform/source/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S` so it can be accessible when building with the bare metal profile. Note that we already have the equivalent file for TARGET_CORTEX_M at `platform/source/TARGET_CORTEX_M/TOOLCHAIN_IAR/cmain.S`. -Additionally it will provide the following advantages: -* Better maintenance of component -* Easy creation of an independent CMake target -* Easy source navigation that mirrors closely the upstream repository - - -## Decision -The following directory restructure is recommended: - -``` -+--cmsis -| +-- README.md -| +-- TARGET_CORTEX_A/ -| +-- TOOLCHAIN_IAR/ -| +-- cmain.S # Currently cmsis/TARGET_CORTEX_A/TOOLCHAIN_IAR -| +-- device/ -| +-- rtos2/ -| +-- mbed_lib.json # New Mbed library named `cmsis-device-rtos2`, so it can be excluded from bare metal profile -| +-- include/ -| +-- A # Header files currently in rtos/source/TARGET_CORTEX/ -| +-- mbed_cmsis_conf.h # Currently in cmsis/ -| +-- source/ -| +-- B # Source files currently in rtos/source/TARGET_CORTEX/ -| +-- RTE/ -| +-- include/ -| +-- RTE_Components.h # Currently in cmsis/ -| +-- TOOLCHAIN_ARM_MICRO/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- TOOLCHAIN_ARM_STD/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- TOOLCHAIN_GCC_ARM/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- TOOLCHAIN_IAR/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- CMSIS_5/ -| +-- CMSIS/ -| +-- RTOS2/ -| +-- mbed_lib.json # Currently in rtos/source/TARGET_CORTEX/, creates `cmsis-cmsis5-rtos2` Mbed library -| +-- Include/ -| +-- C # Content of rtos/source/TARGET_CORTEX/rtx5/Include/ -| +-- RTX/ -| +-- Config/ -| +-- D # Content of rtos/source/TARGET_CORTEX/rtx5/RTX/Config/ -| +-- Include/ -| +-- E # Content of rtos/source/TARGET_CORTEX/rtx5/RTX/Include/ -| +-- Include1/ -| +-- cmsis_os.h # Currently in rtos/source/TARGET_CORTEX/rtx4/ -| +-- Library/ -| +-- cmsis_os1.c # Currently in rtos/source/TARGET_CORTEX/rtx4/ -| +-- Source/ -| +-- F # Content of rtos/source/TARGET_CORTEX/rtx5/RTX/Source/ -| +-- Source/ -| +-- G # Content of rtos/source/TARGET_CORTEX/rtx5/Source -| +-- Core_A/ -| +-- Include/ -| +-- H # Header files currently in cmsis/TARGET_CORTEX_A/ -| +-- Source/ -| +-- I # Source files currently in cmsis/TARGET_CORTEX_A/ -| +-- Core/ -| +-- Include/ -| +-- J # Header files currently in cmsis/TARGET_CORTEX_M/ -| +-- Source/ -| +-- K # Source files currently in cmsis/TARGET_CORTEX_M/ -``` - -However, to cope with Mbed-CLI requirement to find directories to process with the target labels mechanism, some directories will be prefixed with `TARGET_` and capitalized. It will therefore look as follows: - -``` -+--cmsis -| +-- README.md -| +-- TARGET_CORTEX_A/ -| +-- TOOLCHAIN_IAR/ -| +-- cmain.S # Currently cmsis/TARGET_CORTEX_A/TOOLCHAIN_IAR -| +-- device/ -| +-- rtos2/ -| +-- mbed_lib.json # New Mbed library named `cmsis-rtos2`, so it can be excluded from bare metal profile -| +-- include/ -| +-- A # Header files currently in rtos/source/TARGET_CORTEX/ -| +-- mbed_cmsis_conf.h # Currently in cmsis/ -| +-- source/ -| +-- B # Source files currently in rtos/source/TARGET_CORTEX/ -| +-- RTE/ -| +-- include/ -| +-- RTE_Components.h # Currently in cmsis/ -| +-- TOOLCHAIN_ARM_MICRO/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- TOOLCHAIN_ARM_STD/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- TOOLCHAIN_GCC_ARM/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- TOOLCHAIN_IAR/ # Currently in rtos/source/TARGET_CORTEX/ -| +-- CMSIS_5/ -| +-- CMSIS/ -| +-- RTOS2/ -| +-- mbed_lib.json # Currently in rtos/source/TARGET_CORTEX/, creates `rtos` Mbed library -| +-- Include/ -| +-- C # Content of rtos/source/TARGET_CORTEX/rtx5/Include/ -| +-- RTX/ -| +-- Config/ -| +-- D # Content of rtos/source/TARGET_CORTEX/rtx5/RTX/Config/ -| +-- Include/ -| +-- E # Content of rtos/source/TARGET_CORTEX/rtx5/RTX/Include/ -| +-- Include1/ -| +-- cmsis_os.h # Currently in rtos/source/TARGET_CORTEX/rtx4/ -| +-- Library/ -| +-- cmsis_os1.c # Currently in rtos/source/TARGET_CORTEX/rtx4/ -| +-- Source/ -| +-- F # Content of rtos/source/TARGET_CORTEX/rtx5/RTX/Source/ -| +-- Source/ -| +-- G # Content of rtos/source/TARGET_CORTEX/rtx5/Source -| +-- TARGET_CORTEX_A/ -| +-- Include/ -| +-- H # Header files currently in cmsis/TARGET_CORTEX_A/ -| +-- Source/ -| +-- I # Source files currently in cmsis/TARGET_CORTEX_A/ -| +-- TARGET_CORTEX_M/ -| +-- Include/ -| +-- J # Header files currently in cmsis/TARGET_CORTEX_M/ -| +-- Source/ -| +-- K # Source files currently in cmsis/TARGET_CORTEX_M/ -``` +It will provide the following advantages: +* Better maintenance of the CMSIS component +* Easy creation of an independent CMake target that can be built as a library that can be optionally be linked against by end users +* Easy source navigation that mirrors closely the upstream CMSIS_5 repository ## Documentation -The README.md may contain a brief introduction to the component. Detailed documentation may be added under `docs` directory. +A `README.md` within the `cmsis` will contain a brief introduction of the component and will detail the Mbed specific files added. \ No newline at end of file diff --git a/cmsis/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S b/platform/source/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S similarity index 100% rename from cmsis/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S rename to platform/source/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S diff --git a/platform/source/mbed_sdk_boot.c b/platform/source/mbed_sdk_boot.c index 7234578925d..d77c7d1995f 100644 --- a/platform/source/mbed_sdk_boot.c +++ b/platform/source/mbed_sdk_boot.c @@ -23,7 +23,7 @@ /* This startup is for baremetal. There is no RTOS in baremetal, * therefore we protect this file with MBED_CONF_RTOS_PRESENT. - * Note: The start-up code for mbed OS is in rtos/source/TARGET_CORTEX/mbed_boot code file. + * Note: The start-up code for mbed OS is in cmsis/device/rtos/TOOLCHAIN_/mbed_boot_.c code file. */ #if !defined(MBED_CONF_RTOS_PRESENT)