diff --git a/libraries/rtos/rtx_ca/ARM/HAL_CA9.c b/libraries/rtos/rtx/TARGET_CORTEX_A/ARM/HAL_CA9.c similarity index 100% rename from libraries/rtos/rtx_ca/ARM/HAL_CA9.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/ARM/HAL_CA9.c diff --git a/libraries/rtos/rtx_ca/ARM/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_A/ARM/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx_ca/ARM/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_A/ARM/SVC_Table.s diff --git a/libraries/rtos/rtx_ca/HAL_CA.c b/libraries/rtos/rtx/TARGET_CORTEX_A/HAL_CA.c similarity index 100% rename from libraries/rtos/rtx_ca/HAL_CA.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/HAL_CA.c diff --git a/libraries/rtos/rtx_ca/HAL_CM.c b/libraries/rtos/rtx/TARGET_CORTEX_A/HAL_CM.c similarity index 100% rename from libraries/rtos/rtx_ca/HAL_CM.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/HAL_CM.c diff --git a/libraries/rtos/rtx_ca/RTX_CM_lib.h b/libraries/rtos/rtx/TARGET_CORTEX_A/RTX_CM_lib.h similarity index 100% rename from libraries/rtos/rtx_ca/RTX_CM_lib.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/RTX_CM_lib.h diff --git a/libraries/rtos/rtx_ca/RTX_Conf_CA.c b/libraries/rtos/rtx/TARGET_CORTEX_A/RTX_Conf_CA.c similarity index 100% rename from libraries/rtos/rtx_ca/RTX_Conf_CA.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/RTX_Conf_CA.c diff --git a/libraries/rtos/rtx_ca/RTX_Config.h b/libraries/rtos/rtx/TARGET_CORTEX_A/RTX_Config.h similarity index 100% rename from libraries/rtos/rtx_ca/RTX_Config.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/RTX_Config.h diff --git a/libraries/rtos/rtx_ca/cmsis_os.h b/libraries/rtos/rtx/TARGET_CORTEX_A/cmsis_os.h similarity index 100% rename from libraries/rtos/rtx_ca/cmsis_os.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/cmsis_os.h diff --git a/libraries/rtos/rtx_ca/rt_CMSIS.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_CMSIS.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_CMSIS.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_CMSIS.c diff --git a/libraries/rtos/rtx_ca/rt_Event.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Event.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Event.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Event.c diff --git a/libraries/rtos/rtx_ca/rt_Event.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Event.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Event.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Event.h diff --git a/libraries/rtos/rtx_ca/rt_HAL_CA.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_HAL_CA.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_HAL_CA.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_HAL_CA.h diff --git a/libraries/rtos/rtx_ca/rt_HAL_CM.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_HAL_CM.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_HAL_CM.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_HAL_CM.h diff --git a/libraries/rtos/rtx_ca/rt_List.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_List.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_List.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_List.c diff --git a/libraries/rtos/rtx_ca/rt_List.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_List.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_List.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_List.h diff --git a/libraries/rtos/rtx_ca/rt_Mailbox.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mailbox.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Mailbox.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mailbox.c diff --git a/libraries/rtos/rtx_ca/rt_Mailbox.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mailbox.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Mailbox.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mailbox.h diff --git a/libraries/rtos/rtx_ca/rt_MemBox.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_MemBox.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_MemBox.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_MemBox.c diff --git a/libraries/rtos/rtx_ca/rt_MemBox.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_MemBox.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_MemBox.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_MemBox.h diff --git a/libraries/rtos/rtx_ca/rt_Memory.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Memory.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Memory.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Memory.c diff --git a/libraries/rtos/rtx_ca/rt_Memory.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Memory.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Memory.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Memory.h diff --git a/libraries/rtos/rtx_ca/rt_Mutex.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mutex.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Mutex.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mutex.c diff --git a/libraries/rtos/rtx_ca/rt_Mutex.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mutex.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Mutex.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Mutex.h diff --git a/libraries/rtos/rtx_ca/rt_Robin.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Robin.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Robin.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Robin.c diff --git a/libraries/rtos/rtx_ca/rt_Robin.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Robin.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Robin.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Robin.h diff --git a/libraries/rtos/rtx_ca/rt_Semaphore.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Semaphore.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Semaphore.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Semaphore.c diff --git a/libraries/rtos/rtx_ca/rt_Semaphore.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Semaphore.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Semaphore.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Semaphore.h diff --git a/libraries/rtos/rtx_ca/rt_System.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_System.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_System.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_System.c diff --git a/libraries/rtos/rtx_ca/rt_System.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_System.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_System.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_System.h diff --git a/libraries/rtos/rtx_ca/rt_Task.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Task.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Task.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Task.c diff --git a/libraries/rtos/rtx_ca/rt_Task.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Task.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Task.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Task.h diff --git a/libraries/rtos/rtx_ca/rt_Time.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Time.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Time.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Time.c diff --git a/libraries/rtos/rtx_ca/rt_Time.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Time.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Time.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Time.h diff --git a/libraries/rtos/rtx_ca/rt_Timer.c b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Timer.c similarity index 100% rename from libraries/rtos/rtx_ca/rt_Timer.c rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Timer.c diff --git a/libraries/rtos/rtx_ca/rt_Timer.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_Timer.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_Timer.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_Timer.h diff --git a/libraries/rtos/rtx_ca/rt_TypeDef.h b/libraries/rtos/rtx/TARGET_CORTEX_A/rt_TypeDef.h similarity index 100% rename from libraries/rtos/rtx_ca/rt_TypeDef.h rename to libraries/rtos/rtx/TARGET_CORTEX_A/rt_TypeDef.h diff --git a/libraries/rtos/rtx/HAL_CM.c b/libraries/rtos/rtx/TARGET_CORTEX_M/HAL_CM.c similarity index 100% rename from libraries/rtos/rtx/HAL_CM.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/HAL_CM.c diff --git a/libraries/rtos/rtx/RTX_CM_lib.h b/libraries/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h similarity index 100% rename from libraries/rtos/rtx/RTX_CM_lib.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h diff --git a/libraries/rtos/rtx/RTX_Conf.h b/libraries/rtos/rtx/TARGET_CORTEX_M/RTX_Conf.h similarity index 100% rename from libraries/rtos/rtx/RTX_Conf.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/RTX_Conf.h diff --git a/libraries/rtos/rtx/RTX_Conf_CM.c b/libraries/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c similarity index 100% rename from libraries/rtos/rtx/RTX_Conf_CM.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c diff --git a/libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_ARM/HAL_CM0.c b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_ARM/HAL_CM0.c similarity index 100% rename from libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_ARM/HAL_CM0.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_ARM/HAL_CM0.c diff --git a/libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_ARM/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_ARM/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_ARM/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_ARM/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_GCC/HAL_CM0.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_GCC/HAL_CM0.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_GCC/HAL_CM0.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_GCC/HAL_CM0.s diff --git a/libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_GCC/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_GCC/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M0/TOOLCHAIN_GCC/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0/TOOLCHAIN_GCC/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_ARM/HAL_CM0.c b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_ARM/HAL_CM0.c similarity index 100% rename from libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_ARM/HAL_CM0.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_ARM/HAL_CM0.c diff --git a/libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_ARM/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_ARM/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_ARM/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_ARM/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_GCC/HAL_CM0.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_GCC/HAL_CM0.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_GCC/HAL_CM0.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_GCC/HAL_CM0.s diff --git a/libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_GCC/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_GCC/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M0P/TOOLCHAIN_GCC/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M0P/TOOLCHAIN_GCC/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_ARM/HAL_CM3.c b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_ARM/HAL_CM3.c similarity index 100% rename from libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_ARM/HAL_CM3.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_ARM/HAL_CM3.c diff --git a/libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_ARM/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_ARM/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_ARM/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_ARM/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_GCC/HAL_CM3.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_GCC/HAL_CM3.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_GCC/HAL_CM3.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_GCC/HAL_CM3.s diff --git a/libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_GCC/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_GCC/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M3/TOOLCHAIN_GCC/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M3/TOOLCHAIN_GCC/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_ARM/HAL_CM4.c b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/HAL_CM4.c similarity index 100% rename from libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_ARM/HAL_CM4.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/HAL_CM4.c diff --git a/libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_ARM/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_ARM/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/SVC_Table.s diff --git a/libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s diff --git a/libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_GCC/SVC_Table.s b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/SVC_Table.s similarity index 100% rename from libraries/rtos/rtx/TARGET_M4/TOOLCHAIN_GCC/SVC_Table.s rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/SVC_Table.s diff --git a/libraries/rtos/rtx/cmsis_os.h b/libraries/rtos/rtx/TARGET_CORTEX_M/cmsis_os.h similarity index 100% rename from libraries/rtos/rtx/cmsis_os.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/cmsis_os.h diff --git a/libraries/rtos/rtx/os_tcb.h b/libraries/rtos/rtx/TARGET_CORTEX_M/os_tcb.h similarity index 100% rename from libraries/rtos/rtx/os_tcb.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/os_tcb.h diff --git a/libraries/rtos/rtx/rt_CMSIS.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c similarity index 100% rename from libraries/rtos/rtx/rt_CMSIS.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c diff --git a/libraries/rtos/rtx/rt_Event.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Event.c similarity index 100% rename from libraries/rtos/rtx/rt_Event.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Event.c diff --git a/libraries/rtos/rtx/rt_Event.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Event.h similarity index 100% rename from libraries/rtos/rtx/rt_Event.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Event.h diff --git a/libraries/rtos/rtx/rt_HAL_CM.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_HAL_CM.h similarity index 100% rename from libraries/rtos/rtx/rt_HAL_CM.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_HAL_CM.h diff --git a/libraries/rtos/rtx/rt_List.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_List.c similarity index 100% rename from libraries/rtos/rtx/rt_List.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_List.c diff --git a/libraries/rtos/rtx/rt_List.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_List.h similarity index 100% rename from libraries/rtos/rtx/rt_List.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_List.h diff --git a/libraries/rtos/rtx/rt_Mailbox.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mailbox.c similarity index 100% rename from libraries/rtos/rtx/rt_Mailbox.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mailbox.c diff --git a/libraries/rtos/rtx/rt_Mailbox.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mailbox.h similarity index 100% rename from libraries/rtos/rtx/rt_Mailbox.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mailbox.h diff --git a/libraries/rtos/rtx/rt_MemBox.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_MemBox.c similarity index 100% rename from libraries/rtos/rtx/rt_MemBox.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_MemBox.c diff --git a/libraries/rtos/rtx/rt_MemBox.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_MemBox.h similarity index 100% rename from libraries/rtos/rtx/rt_MemBox.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_MemBox.h diff --git a/libraries/rtos/rtx/rt_Mutex.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mutex.c similarity index 100% rename from libraries/rtos/rtx/rt_Mutex.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mutex.c diff --git a/libraries/rtos/rtx/rt_Mutex.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mutex.h similarity index 100% rename from libraries/rtos/rtx/rt_Mutex.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Mutex.h diff --git a/libraries/rtos/rtx/rt_Robin.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Robin.c similarity index 100% rename from libraries/rtos/rtx/rt_Robin.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Robin.c diff --git a/libraries/rtos/rtx/rt_Robin.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Robin.h similarity index 100% rename from libraries/rtos/rtx/rt_Robin.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Robin.h diff --git a/libraries/rtos/rtx/rt_Semaphore.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Semaphore.c similarity index 100% rename from libraries/rtos/rtx/rt_Semaphore.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Semaphore.c diff --git a/libraries/rtos/rtx/rt_Semaphore.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Semaphore.h similarity index 100% rename from libraries/rtos/rtx/rt_Semaphore.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Semaphore.h diff --git a/libraries/rtos/rtx/rt_System.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_System.c similarity index 100% rename from libraries/rtos/rtx/rt_System.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_System.c diff --git a/libraries/rtos/rtx/rt_System.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_System.h similarity index 100% rename from libraries/rtos/rtx/rt_System.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_System.h diff --git a/libraries/rtos/rtx/rt_Task.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Task.c similarity index 100% rename from libraries/rtos/rtx/rt_Task.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Task.c diff --git a/libraries/rtos/rtx/rt_Task.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Task.h similarity index 100% rename from libraries/rtos/rtx/rt_Task.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Task.h diff --git a/libraries/rtos/rtx/rt_Time.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Time.c similarity index 100% rename from libraries/rtos/rtx/rt_Time.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Time.c diff --git a/libraries/rtos/rtx/rt_Time.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_Time.h similarity index 100% rename from libraries/rtos/rtx/rt_Time.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_Time.h diff --git a/libraries/rtos/rtx/rt_TypeDef.h b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_TypeDef.h similarity index 100% rename from libraries/rtos/rtx/rt_TypeDef.h rename to libraries/rtos/rtx/TARGET_CORTEX_M/rt_TypeDef.h diff --git a/workspace_tools/build.py b/workspace_tools/build.py index 9409f2328b..161dbf773b 100755 --- a/workspace_tools/build.py +++ b/workspace_tools/build.py @@ -37,14 +37,6 @@ from workspace_tools.build_api import static_analysis_scan, static_analysis_scan from workspace_tools.build_api import print_build_results from workspace_tools.settings import CPPCHECK_CMD, CPPCHECK_MSG_FORMAT -# Cortex-M and Cortex-A use different RTOS sources, return the proper libs here -def get_rtos_libs(options, mcu): - if options.rtos: - libs = ['rtx', 'rtos'] if mcu.core != 'Cortex-A9' else ['rtx_ca', 'rtos_ca'] - else: - libs = [] - return libs - if __name__ == '__main__': start = time() @@ -163,6 +155,8 @@ if __name__ == '__main__': libraries = [] # Additional Libraries + if options.rtos: + libraries.extend(["rtx", "rtos"]) if options.eth: libraries.append("eth") if options.usb: @@ -191,7 +185,7 @@ if __name__ == '__main__': mcu = TARGET_MAP[target] # CMSIS and MBED libs analysis static_analysis_scan(mcu, toolchain, CPPCHECK_CMD, CPPCHECK_MSG_FORMAT, verbose=options.verbose, jobs=options.jobs) - for lib_id in libraries + get_rtos_libs(options, mcu): + for lib_id in libraries: # Static check for library static_analysis_scan_lib(lib_id, mcu, toolchain, CPPCHECK_CMD, CPPCHECK_MSG_FORMAT, options=options.options, @@ -214,7 +208,7 @@ if __name__ == '__main__': lib_build_res = build_mbed_libs(mcu, toolchain, options=options.options, notify=notify, verbose=options.verbose, jobs=options.jobs, clean=options.clean, macros=options.macros) - for lib_id in libraries + get_rtos_libs(options, mcu): + for lib_id in libraries: notify = print_notify_verbose if options.extra_verbose_notify else None # Special notify for CI (more verbose) build_lib(lib_id, mcu, toolchain, options=options.options, notify=notify, verbose=options.verbose, clean=options.clean, diff --git a/workspace_tools/libraries.py b/workspace_tools/libraries.py index 6ec4d36165..5bb19913e0 100644 --- a/workspace_tools/libraries.py +++ b/workspace_tools/libraries.py @@ -33,18 +33,6 @@ LIBRARIES = [ "build_dir": RTOS_LIBRARIES, "dependencies": [MBED_LIBRARIES, MBED_RTX], }, - { - "id": "rtx_ca", - "source_dir": MBED_RTX_CA, - "build_dir": RTOS_LIBRARIES, - "dependencies": [MBED_LIBRARIES], - }, - { - "id": "rtos_ca", - "source_dir": RTOS_ABSTRACTION, - "build_dir": RTOS_LIBRARIES, - "dependencies": [MBED_LIBRARIES, MBED_RTX_CA], - }, # USB Device libraries { diff --git a/workspace_tools/paths.py b/workspace_tools/paths.py index 4fed2995c7..2b601e8170 100644 --- a/workspace_tools/paths.py +++ b/workspace_tools/paths.py @@ -49,7 +49,6 @@ MBED_RPC = join(LIB_DIR, "rpc") # mbed RTOS RTOS = join(LIB_DIR, "rtos") MBED_RTX = join(RTOS, "rtx") -MBED_RTX_CA = join(RTOS, "rtx_ca") RTOS_ABSTRACTION = join(RTOS, "rtos") RTOS_LIBRARIES = join(BUILD_DIR, "rtos") diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 6afdadaaa7..988112b6fc 100644 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -16,13 +16,13 @@ limitations under the License. """ CORE_LABELS = { - "ARM7TDMI-S": "ARM7", - "Cortex-M0" : "M0", - "Cortex-M0+": "M0P", - "Cortex-M3" : "M3", - "Cortex-M4" : "M4", - "Cortex-M4F" : "M4", - "Cortex-A9" : "A9" + "ARM7TDMI-S": ["ARM7"], + "Cortex-M0" : ["M0", "CORTEX_M"], + "Cortex-M0+": ["M0P", "CORTEX_M"], + "Cortex-M3" : ["M3", "CORTEX_M"], + "Cortex-M4" : ["M4", "CORTEX_M"], + "Cortex-M4F" : ["M4", "CORTEX_M"], + "Cortex-A9" : ["A9", "CORTEX_A"] } import os @@ -58,7 +58,7 @@ class Target: return 4 if self.is_disk_virtual else 1.5 def get_labels(self): - return [self.name, CORE_LABELS[self.core]] + self.extra_labels + return [self.name] + CORE_LABELS[self.core] + self.extra_labels def init_hooks(self, hook, toolchain_name): pass